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

Use different session and server IDs for new connections with SockJS #93

Closed
daniel-naegele opened this issue Sep 7, 2023 · 1 comment

Comments

@daniel-naegele
Copy link

Currently, the session and server IDs only get generated once - when the StompConfig is created. This can lead to the following issue:

  1. Connect to SockJS Server
  2. End connection without properly sending the DISCONNECT command (connection timing out or when Connection not properly closed in right timed deactivate call. #92 happens)
  3. Initiate connection again

Our SockJS implementation (Spring Boot) then ignores the connect frame, as it thinks that the client is still connected. This leads to the CONNECTED frame not being sent and thus StompConfig#onConnect() not being called. This can be an issue for subscribing to topics if onConnect has never been called so far.

Log output from our Spring Boot backend:
2023-09-07T14:33:41.561Z WARN 1 --- [boundChannel-64] o.s.m.s.b.SimpleBrokerMessageHandler : Ignoring CONNECT in session kd43jkqq. Already connected.

@KammererTob
Copy link
Contributor

Fixed by 18259f1

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