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

Reuse session.id to persist connections across refreshes #341

Open
colinschwegmann opened this issue Mar 30, 2020 · 0 comments
Open

Reuse session.id to persist connections across refreshes #341

colinschwegmann opened this issue Mar 30, 2020 · 0 comments

Comments

@colinschwegmann
Copy link

Hi all,

I don't know if what I've encountered is a bug or the expected behaviour. I'll need to hear opinions on this.

Essentially, a web app has been created that connects to the sockjs server a fixed URL and port. Additionally, we have a case where we would like to reconnect to the same socket session (id) after a refresh or disconnect (based on a unique user id).

When we leave the sockjs server to generate the UUID for each refresh we get a connection and we can send and receive messages correctly. However, if we provide a fixed session.id the first connection to the sockjs server works perfectly. A refresh on that page produces the following:

  1. Multiple repeated 101 upgrades but no connection for approximately 20s.
  2. Eventually when the socket connection is established no messages are sent back to the server. It's as if the connection is there but broken.

Please excuse my ignorance if I don't understand a concept here, but, seeing as the session.id can be specified why would this approach not 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

1 participant