简体   繁体   中英

Detect client has disconnected from jetty server (using continuations)

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM