--- DISCONNECT ---
431618
protected void disconnect() {
		connected.set(false);
		synchronized (publishers) {
			for (Publisher publisher : publishers.values()) {
				try {
					publisher.shutdown();
				} catch (Exception ingored) {
				}
			}
			publishers.clear();
		}
		synchronized (subscribers) {
			for (Subscriber subscriber : subscribers.values()) {
				try {
					subscriber.stopAsync();
				} catch (Exception ingored) {
				}
			}
			subscribers.clear();
		}
		if (topicAdmin != null) {
			try {
				topicAdmin.close();
			} catch (Exception ingored) {
			}
			topicAdmin = null;
		}
		if (subscriptionAdmin != null) {
			try {
				subscriptionAdmin.close();
			} catch (Exception ingored) {
			}
			subscriptionAdmin = null;
		}
	}
180531
public void disconnect(){
        if(timer != null){
            timer.cancel();
        }
        if (ws != null && ws.isOpen()) {
            ws.disconnect();
            subscribedTokens = new HashSet<>();
            modeMap.clear();
        }
    }
1218675
@Override
	public final Promise disconnect() {
		if (client != null) {
			client.close();
			client = null;
		}
		return super.disconnect();
	}
1125242
@Override
  public synchronized void disconnect() {
    try {
      // If there is an error with the handler, dont bother logging out.
      if (!mailClientHandler.isHalted()) {
        if (mailClientHandler.idleRequested.get()) {
          log.warn("Disconnect called while IDLE, leaving idle and logging out.");
          done();
        }

        // Log out of the IMAP Server.
        channel.write(". logout\n");
      }

      currentFolder = null;
    } catch (Exception e) {
      // swallow any exceptions.
    } finally {
      // Shut down all channels and exit (leave threadpools as is--for reconnects).
      // The Netty channel close listener will fire a disconnect event to our client,
      // automatically. See connect() for details.
      try {
        channel.close().awaitUninterruptibly(config.getTimeout(), TimeUnit.MILLISECONDS);
      } catch (Exception e) {
        // swallow any exceptions.
      } finally {
        mailClientHandler.idleAcknowledged.set(false);
        mailClientHandler.disconnected();
        if (disconnectListener != null)
          disconnectListener.disconnected();
      }
    }
  }
404436
function _disconnect (context) {
  /* eslint-disable no-invalid-this */
  // Remove all connections to the context
  forEach(this.__events__, (bindings, event) => {
    for (let i = bindings.length - 1; i >= 0; i--) {
      // bindings[i] may have been removed by the previous steps
      // so check it still exists
      if (bindings[i] && bindings[i].context === context) {
        _off.call(this, event, bindings[i].method, context)
      }
    }
  })
  return this
  /* eslint-enable no-invalid-this */
}
630131
def disconnect(self):
        """"""
        self.canvas.mpl_disconnect(self._cidmotion)
        self.canvas.mpl_disconnect(self._ciddraw)
149134
public function disconnect(): void
    {
        if ($this->socket) {
            stream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);
        }
        $this->socket = null;
        $this->connected = false;
    }
159180
function Disconnect()
	{
		$this->handler->Log(DBH_LOG_INFO, "Closing Connection...");

		if ($this->dbopen)
		{
			$this->adapter->Close();
			$this->dbopen = false;
			$this->handler->Log(DBH_LOG_INFO, "Connection closed");
		}
		else
		{
			$this->handler->Log(DBH_LOG_WARNING, "Connection Already Closed");
		}
	}
995468
public function disconnect()
	{    	
		$this->exec('echo "EXITING" && exit;');
		
		$this->_conn_link = NULL;
		$this->_connected = FALSE;
		$this->_sftp = NULL;
	}
102665
def on_disconnect(self):
        ""
        if self._stream is not None:
            self._stream = None
        if self._buffer is not None:
            self._buffer.close()
            self._buffer = None
        self.encoding = None
131588
def disconnect(self):
        
        all_conns = chain(
            self._available_connections.values(),
            self._in_use_connections.values(),
        )

        for node_connections in all_conns:
            for connection in node_connections:
                connection.disconnect()
850040
public function disconnect()
  {
    if($this->stream === null) return;

    $this->stream = null;

    TeamSpeak3_Helper_Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "Disconnected");
  }
1017407
@Override
  protected void disconnect()
  {
    ConnectionHttp conn = _request.connHttp();
    
    if (conn != null) {
      try {
        _request.ok();
        //conn.connTcp().writeStream().close();
        //conn.connTcp().disconnect();
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
  }
956610
def disconnect(self):
        """"""
        if self._connected:
            self._connected = False
            self._conn.disconnect()
344390
public void disconnect() {

        this.store = null;

        PersistentStore store =
            database.persistentStoreCollection.getStore(this);

        store.release();

        isConnected = false;
    }
203036
@Override
    public synchronized void disconnect() {
        if (connectSession != null) {
            logger.debug("Disconnecting client connection.");
            connectSession.disconnect();
            connectSession = null;
        }
    }
460227
function disconnect() {
  var force = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];
  var cb = arguments.length <= 1 || arguments[1] === undefined ? undefined : arguments[1];

  console.log('Disconnecting client: ' + clientId);
  stopPub = true;
  client.end(force, cb);
}