code: public void shutdown() {
          final Connection connection;
          synchronized (this) {
              if(shutdown) return;
              shutdown = true;
              connection = this.connection;
              if(connectTask != null) {
                  connectTask.shutdown();
              }
          }
          if (connection != null) {
              connection.closeAsync();
          }
      }
docs: Shutdown the connection manager.