Reconnecting all the sockets back after refreshing the browser #4666
Unanswered
UdayMahajan1
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So I'm developing a Chat app as a project where I have the mentioned problem.
When I refresh the browser all the socket connections are lost and all the users need to reconnect to chat again.
I want the user who refreshed the browser to get automatically reconnected to the room after the browser has finished refreshing and not redirect him to the main page to login again.
This is my websockets.js :
This is my chat.js :
PS : I also tried using the connectionStateRecovery but I wasn't able to get the desired result.
If you need any additional information to resolve my error please ask.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions