code: @Override
      public synchronized void disconnect() {
          if (connectSession != null) {
              logger.debug("Disconnecting client connection.");
              connectSession.disconnect();
              connectSession = null;
          }
      }
docs: Disconnects the connection.