Commit a1ec19a
fix(connections): stop a transient request timeout from killing the connection loop
A per-request timeout during a connected window surfaces as an
OperationCanceledException even when the connection token is NOT cancelled.
GetRigPositionsAsync rethrew it unconditionally and RunAsync treats any OCE as
a shutdown signal, so a transient slow map endpoint permanently terminated the
per-server connection loop with no reconnect (bot connected, dropped ~20s later,
then went silent). Confirmed via a live repro trace.
Guard the timeout catches with `when (ct.IsCancellationRequested)` in
GetRigPositionsAsync, PollMarkersAsync and PollReachabilityAsync so a request
timeout degrades that one window instead of tearing down the connection, and add
the missing `.WaitAsync` timeout guard to GetClanInfoAsync (the one connect-time
probe that could block indefinitely on a dead socket).
Regression test: Connect_MonumentsTimeout_DoesNotKillLoop_AndStillReconnects.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 00039cc commit a1ec19a
4 files changed
Lines changed: 65 additions & 8 deletions
File tree
- src/RustPlusBot.Features.Connections
- Listening
- Supervisor
- tests/RustPlusBot.Features.Connections.Tests
- Fakes
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
384 | 387 | | |
385 | 388 | | |
386 | 389 | | |
| |||
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
706 | | - | |
| 706 | + | |
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
710 | | - | |
| 710 | + | |
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
| 714 | + | |
| 715 | + | |
714 | 716 | | |
715 | 717 | | |
716 | 718 | | |
| |||
767 | 769 | | |
768 | 770 | | |
769 | 771 | | |
770 | | - | |
| 772 | + | |
771 | 773 | | |
772 | 774 | | |
773 | 775 | | |
774 | | - | |
| 776 | + | |
775 | 777 | | |
776 | 778 | | |
777 | 779 | | |
| 780 | + | |
| 781 | + | |
778 | 782 | | |
779 | 783 | | |
780 | 784 | | |
| |||
942 | 946 | | |
943 | 947 | | |
944 | 948 | | |
945 | | - | |
| 949 | + | |
946 | 950 | | |
| 951 | + | |
947 | 952 | | |
948 | 953 | | |
949 | | - | |
| 954 | + | |
950 | 955 | | |
951 | 956 | | |
952 | 957 | | |
| 958 | + | |
| 959 | + | |
953 | 960 | | |
954 | 961 | | |
955 | 962 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
234 | 261 | | |
235 | 262 | | |
236 | 263 | | |
| |||
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
| |||
119 | 125 | | |
120 | 126 | | |
121 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
122 | 136 | | |
123 | 137 | | |
124 | 138 | | |
| |||
244 | 258 | | |
245 | 259 | | |
246 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
247 | 265 | | |
248 | 266 | | |
249 | 267 | | |
| |||
393 | 411 | | |
394 | 412 | | |
395 | 413 | | |
396 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
397 | 417 | | |
398 | 418 | | |
399 | 419 | | |
| |||
0 commit comments