code: protected void closeSession(final String message, final Throwable t) {
          if (t != null) {
              LOGGER.error(message, t);
              proxyIoSession.setAuthenticationFailed(true);
          } else {
              LOGGER.error(message);
          }
  
          getSession().close(true);
      }
docs: Closes the session.
  
  @param message the error message
  @param t the exception which caused the session closing