Skip to content

Conversation

@NickCraver
Copy link
Collaborator

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.

@NickCraver NickCraver merged commit 437e1ff into main Mar 4, 2025
4 of 6 checks passed
@NickCraver NickCraver deleted the craver/retry-backoff-respect branch March 4, 2025 16:22
NickCraver added a commit that referenced this pull request Mar 6, 2025
…2856)

Additional case handling for #2853, respecting backoff in the disconnected -> resurrecting state case. We need to check backoff in that flow as well to prevent a premature `TryConnect`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants