Skip to content
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

How to handle reconnect / resume session? #83

Open
thorwebdev opened this issue Dec 4, 2024 · 1 comment
Open

How to handle reconnect / resume session? #83

thorwebdev opened this issue Dec 4, 2024 · 1 comment

Comments

@thorwebdev
Copy link

Any guidance on how to handle the reconnection to my relay server after the websocket connection dropped (for any reason). Is there an event on the client to listen when the connection drops and to somehow reconnect and resume the previous session?

@mbuptivo
Copy link

mbuptivo commented Dec 5, 2024

Hi, how do you detect a disconnection in your app? I'm trying to follow the code. RealtimeAPI creates the websocket and listens for 'close' and 'error' events. Both cases dispatch a 'close' event via inherited RealtimeEventHandler. RealtimeClient has property "realtime" so listening to 'close' on realtime should work...

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

No branches or pull requests

2 participants