Detect client has disconnected from jetty server (using continuations)
-
24-09-2019 - |
Question
I am using jetty continuations and I was wondering if I can detect that the client has disconnected(closed connection to jetty server) from the server.
Thanks, Alfred
Solution
I don't know if there is a cleaner way to do it but, when you call continuation.resume() you will get an IllegalStateException if the client has disconnected. Just catch that exception.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow