code: @Override
      public void sessionClosed(NextFilter nextFilter, IoSession session)
              throws SSLException {
          SslHandler handler = getSslSessionHandler(session);
          try {
              synchronized (handler) {
                  // release resources
                  handler.destroy();
              }
  
              handler.flushScheduledEvents();
          } finally {
              // notify closed session
              nextFilter.sessionClosed(session);
          }
      }
docs: IoFilter impl.