-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Replay subscriptions when reconnecting in websocket #3772
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
Conversation
- Store request body in callback map for replay capability - Clear subscriptions and replay pending requests on reconnect
- Fix reconnection logic to iterate over subscriptions instead of requests - Store request body in subscriptions for proper reconnection - Remove body from requests map to avoid duplication - Ensure subscriptions can be properly restored after reconnect
🦋 Changeset detectedLatest commit: d5c33ea The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@hazelnutcloud is attempting to deploy a commit to the Wevm Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amnatxx199x
Fixes #3771
This PR fixes the issue where WebSocket subscriptions are lost after a reconnection and not automatically restored. When using the WebSocket transport with
reconnect: true
, subscriptions created viawatchBlockNumber
,watchContractEvent
, etc. would silently stop working after the connection dropped and reconnected.