-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixing reconnect handling #1627
Conversation
After a reconnect the old heartbeat checker was not finished, but a new heartbeat checker was created. After many reconnects, the checkers stopped working because some checker always recognized a timeout and caused a new reconnect.
WalkthroughThe changes involve modifications to the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Websocket
Client->>Websocket: open connection
Websocket->>Websocket: #stopAssignedHeartbeat()
Websocket->>Websocket: start new heartbeat
Websocket-->>Client: connection established
Client->>Websocket: close connection
Websocket->>Websocket: #stopAssignedHeartbeat()
Websocket-->>Client: connection closed
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🔇 Additional comments (5)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
very nice |
After a reconnect the old heartbeat checker was not finished, but a new heartbeat checker was created. After many reconnects, the checkers stopped working because some checker always recognized a timeout and caused a new reconnect.
The fix ensures that before creating a new heartbeat checker, the old one is stopped. Also on reset a connection, the old one is stopped.
This solves the reconnect problem for me:
Similar issue: #1425
Summary by CodeRabbit