如何检查客户端连接中断
Brought to you by:
jianch
@Override
protected void finalize() throws Throwable
{
// In some scenarios we have seen the JDK finalizing the DelegatingSession while the call to session.close() was still in progress
//
if (!closed && !session.isClosed())
{
DelegatingSession.log.warn("I'm closing a core ClientSession you left open. Please make sure you close all ClientSessions explicitly " + "before letting them go out of scope! " +
System.identityHashCode(this));
DelegatingSession.log.warn("The ClientSession you didn't close was created here:", creationStack);
close();
}
super.finalize();
}