Commit 8b927cb
committed
fix: surface TreeXML parse failures to the discovery retry mechanism
When parseString failed on the buffered TreeXML response (truncated payload,
encoding glitch, C-Gate restart mid-stream, etc.), the error was logged but
nothing else: no retry was scheduled, no PAUSE state was set, and the
network's discovery status sat in DISCOVERING forever even though no further
work was happening. The watchdog had already been cleared when the 344
end-of-tree was received, so the stuck state was also invisible to
diagnostics.
Now the catch path calls _handleTreeRequestFailure with reason='parse error',
which routes it through the same backoff retry budget used for 401 Network
not found. After the retry limit is exhausted the network transitions to
PAUSED with the standard recovery hint logged.
Regression test added: feed broken XML to handleTreeData/handleTreeEnd,
assert _treeRequestState records the failure and the initial backoff
re-issues the gettree.1 parent 4f2c1c1 commit 8b927cb
2 files changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
502 | 507 | | |
503 | 508 | | |
504 | 509 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
558 | 591 | | |
559 | 592 | | |
560 | 593 | | |
| |||
0 commit comments