WriteFuture future = null;
try {
synchronized (handler) {
if (isSSLStarted(session)) {
future = initiateClosure(nextFilter, session);
future.addListener(new IoFutureListener() {
public void operationComplete(IoFuture future) {
nextFilter.filterClose(session);
}
});
}