Look at addFailureListener on ClientSession.
If you need it on the server side, Maybe you could use Interceptor to capture the connections established and add a FailureListener to the Connection.
Thanks for your reply! That was a good idea. But if a client disconnects without calling close, neither the FailureListener nor the InterceptorListener is called. I think these client are kicked after a timeout. Is there any possibility to become notified in such a situation ?
The FailureListener should be called after TTL. (Time to live)1 of 1 people found this helpful