-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Tracking of WebSocket Sessions in WebSocket containers #3379
Comments
In a conversation with @sbordet the tracking shouldn't be accomplished via raw |
In Jetty 9.4.x there is a WebSocketSessionListener that is used to handle the add/remove of sessions to this collection. |
…cket Container Signed-off-by: Joakim Erdfelt <joakim@erdfelt.com>
… Container APIs Signed-off-by: Joakim Erdfelt <joakim@erdfelt.com>
HTTP2 equivalent was reported in #2828. |
… Container APIs + Jetty WebSocket API now tracks Sessions and will close them on lifecycle stop + Javax WebSocket API now tracks Sessions and will close them on lifecycle stop + Adding Jetty WebSocket tests for proper close / session tracking Signed-off-by: Joakim Erdfelt <joakim@erdfelt.com>
Opened PR #3383 |
Can you explain why this is needed? The managed selector would already close we connections on stop? |
First is to support Then there's the tear down at the Session level, along with the application notification requirements. Then there's the ability to hook into the Session activity via listeners (something people have asked for). These features exist on Jetty 9.4.x currently btw. |
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
… Container APIs + Jetty WebSocket API now tracks Sessions and will close them on lifecycle stop + Javax WebSocket API now tracks Sessions and will close them on lifecycle stop + Adding Jetty WebSocket tests for proper close / session tracking + Disabling tests that need triage Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
…ession-tracking Issue #3379 - Add tracking of WebSocket Sessions to various WebSocket Container APIs
Completed, and merged. |
In Jetty 9.x all open sessions are tracked for when the container (client or server) is stopped via the Jetty lifecycle.
This is used by both Jetty WebSockets and Javax WebSockets to gracefully close all open connections when the container stops (this is tracked in issue #3375)
This tracking is also used by Jetty WebSocket API and Javax WebSocket API to return the list of open sessions via the
session.getOpenSessions()
API.The text was updated successfully, but these errors were encountered: