Considering that WebSocketClient's lifecycle for stop will iterate through all Sessions still being tracked and close them, you've just created a logic loop.
If you want to stop the WebSocketClient, you should do that outside of the scope of a Session or Endpoint. Joakim Erdfelt / [email protected] On Mon, Jun 27, 2016 at 1:13 PM, Michael Velbaum <[email protected]> wrote: > Hi, > > I'm interacting with a web-service which allows me as to initiate a > websocket connection (to receive updates) as part of my regular login > session. In case the WebSocket gets closed (the onClose() handler is > called), I would like to terminate my own session-related data structures > cleanly and mark the session as closed. > > Currently, once the onClose() is called, it calls my own session.close() > function which ends up calling webSocketClient.stop(). > > Is it legal to call stop() on the WS client while inside the onClose() > handler? > If not, do you have any recommendation on how else to free up resources of > the WebSocketClient? > > Thanks! > > > _______________________________________________ > jetty-users mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users >
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
