Commit 437e1ff
authored
Fix: Respect IReconnectRetryPolicy in disconnect loops (#2853)
Fixes the case where we loop from `Connecting` -> `BeginConnectAsync` -> `OnDisconnected` and the next heartbeat triggers a reconnect again due to the backoff thresholds resetting. This ultimately causes the backoff to not be respected.
Here, we're doing 2 things:
- Upping the max exponential backoff window to 60 seconds which better handlers clients at scale and mass DDoS cases.
- Only resets the reconnect counter on the first disconnect, not doing so again until we've successfully reconnected and heartbeated again, so backoffs are properly respected.1 parent 3bd3e66 commit 437e1ff
File tree
3 files changed
+14
-3
lines changed- docs
- src/StackExchange.Redis
3 files changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
597 | 598 | | |
598 | 599 | | |
599 | 600 | | |
| 601 | + | |
| 602 | + | |
600 | 603 | | |
601 | 604 | | |
602 | 605 | | |
| |||
668 | 671 | | |
669 | 672 | | |
670 | 673 | | |
671 | | - | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
672 | 682 | | |
673 | 683 | | |
674 | 684 | | |
| |||
0 commit comments