Commit 988f5df
authored
fix(tsp): say why an inbound frame was not claimed as a reply (#136)
The claim predicate added with the TSP inbound work returned `false` for every
failure mode without recording any of them. On a shared socket that is right in
principle — a frame from another peer is not this request's problem — but it
made the one case that *is* a problem indistinguishable from silence: when the
VTA's reply is declined, the request waits out its full timeout and reports
`timed out awaiting reply frame`, with no record anywhere that a frame arrived
at all, let alone why it was rejected.
That is a regression in diagnosability against the code it replaced, which
threw a typed error naming the sender mismatch or the parse failure. The
predicate is the only thing in the path that knows; if it does not report, by
construction nothing downstream can.
It now records the reason for the most recent decline — unpack failure, sender
mismatch, unparseable payload, or a `threadId` that does not thread to this
request (naming both values, plus the reply's own type and id) — and attaches it
to the error the caller sees when the wait ends. The frame is still declined in
exactly the same cases; only the silence is removed.
Signed-off-by: Glenn Gore <glenn.g@affinidi.com>1 parent 4f4f5f5 commit 988f5df
1 file changed
Lines changed: 48 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
| |||
204 | 210 | | |
205 | 211 | | |
206 | 212 | | |
207 | | - | |
208 | | - | |
209 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
210 | 223 | | |
211 | 224 | | |
212 | | - | |
213 | | - | |
| 225 | + | |
214 | 226 | | |
215 | 227 | | |
216 | | - | |
| 228 | + | |
| 229 | + | |
217 | 230 | | |
218 | 231 | | |
219 | 232 | | |
220 | | - | |
221 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
222 | 242 | | |
223 | 243 | | |
224 | 244 | | |
225 | 245 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
230 | 266 | | |
231 | 267 | | |
232 | 268 | | |
| |||
0 commit comments