Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Is OnWebSocketClose called after OnWebSocketError?


I'm using the Jetty WebSocket API (for Jetty 11, if that makes a difference). I'm looking at the documentation for the OnWebSocketError event, and it says that this will close the session. However, I'm unable to find out whether this will in turn trigger the OnWebSocketClose event.

Essentially I want to know if I can put cleanup code under the OnWebSocketClose event, or if I have to also put it under OnWebSocketError to guarantee it executes if the websocket closes due to an error.

James Reeves

Back to the top