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

Reconnect user on page refresh #106

Open
vikasvyas946 opened this issue Sep 20, 2017 · 1 comment
Open

Reconnect user on page refresh #106

vikasvyas946 opened this issue Sep 20, 2017 · 1 comment

Comments

@vikasvyas946
Copy link

Hi
i want to ask one thing that if user refresh or reload page then it will automatically connect to websocket and continue to chat because currently if i refresh the page user will disconnect and connect with new connection.

@ghedipunk
Copy link
Owner

No, you can not reuse the same connection after it has been disconnected.

This is a security feature built into TCP/IP, rather than a limitations of this WebSockets library, the WebSockets protocol in general, etc.

Rather, if you want to resume the user's session across different connections, you will need a way to track that user, such as having them log in again, use a session cookie and read it during the handshake, etc.

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