code: protected void _disconnect() {
      IoSession currentSession = this.session;
      if (currentSession != null) {
        if (!currentSession.isClosing()) {
  
          log.info("Closing connection to aggregator at {}.",
              currentSession.getRemoteAddress());
          currentSession.close(true);
  
        }
        this.session = null;
        this.sentHandshake = null;
        this.receivedHandshake = null;
        this.canSendSamples = false;
        for (ConnectionListener listener : this.connectionListeners) {
          listener.connectionInterrupted(this);
        }
      }
    }
docs: Disconnects from the aggregator, destroying any sessions and executor
  filters that are already created. Resets the connection state.