Disconnects the slot from the signal
336360
def disconnect(self, slot):
        
        if not callable(slot):
            return

        if inspect.ismethod(slot):
            # If it's a method, then find it by its instance
            slotSelf = slot.__self__
            for s in self._slots:
                if isinstance(s, weakref.WeakKeyDictionary) and (slotSelf in s) and (s[slotSelf] is slot.__func__):
                    self._slots.remove(s)
                    break
        elif isinstance(slot, partial) or '<' in slot.__name__:
            # If it's a partial or lambda, try to remove directly
            try:
                self._slots.remove(slot)
            except ValueError:
                pass
        else:
            # It's probably a function, so try to remove by weakref
            try:
                self._slots.remove(weakref.ref(slot))
            except ValueError:
                pass
1255281
protected void _disconnect() {
		this.connected = false;
		IoSession currentSession = this.session;
		if (currentSession != null) {
			if (!currentSession.isClosing()) {

				log.info(
						"Closing connection to aggregator at {} (waiting {}ms).",
						currentSession.getRemoteAddress(),
						Long.valueOf(this.connectionTimeout));
				currentSession.close(true);
			}
			this.session = null;
			this.sentHandshake = null;
			this.receivedHandshake = null;
			this.sentSubscription = null;
			this.receivedSubscription = null;
			for (ConnectionListener listener : this.connectionListeners) {
				listener.connectionInterrupted(this);

			}
		}
	}
1328054
def disconnect_all(self):
        
        if not self.__connected:
            return  # assert self.__connected, "disconnect_all() already in \"disconnected\" state"
        self.__disconnecting = True
        try:
            for signal in self.__signals:
                signal.disconnect(self.__signalReceived)
            if self.__slot is not None:
                self.__sigDelayed.disconnect(self.__slot)
            self.__connected = False
        finally:
            self.__disconnecting = False
1158516
function disconnect(socket) {
  if (socket.namespace.name === '') return socket.disconnect();
  socket.packet({type:'disconnect'});
  socket.manager.onLeave(socket, socket.namespace.name);
  socket.$emit('disconnect', 'booted');
}
1243770
def disconnect(self):
        """"""
        for signal, kwargs in self.connections:
            signal.disconnect(self, **kwargs)
1208575
def disconnect(self):
        """"""
        self.chain.connection.log("Disconnecting: {}".format(self))
        if self.connected:
            if self.protocol:
                if self.is_console:
                    while self.mode != 'global':
                        try:
                            self.send('exit', timeout=10)
                        except CommandTimeoutError:
                            break

                self.protocol.disconnect(self.driver)
                self.protocol = None

            self.connected = False
            self.ctrl = None
711224
def exit(self, signal=None, frame=None):
        
        self.input_channel.close()
        self.client_queue.close()
        self.connection.close()
        log.info("Worker exiting")
        sys.exit(0)
292347
public void disconnect() {
        reconnect = false;
        websocket.get().sendClose(WebSocketCloseReason.DISCONNECT.getNumericCloseCode());
        // cancel heartbeat timer if within one minute no disconnect event was dispatched
        api.getThreadPool().getDaemonScheduler().schedule(() -> heartbeatTimer.updateAndGet(future -> {
            if (future != null) {
                future.cancel(false);
            }
            return null;
        }), 1, TimeUnit.MINUTES);
    }
815672
def disconnect(self):
        """"""
        try:
            self._link.disconnect()
            self._protocol = None
            self._invalidate_cached_registers()
        except DAPAccess.Error as exc:
            six.raise_from(self._convert_exception(exc), exc)
370341
protected void disconnect() {
		if (poller != null) {
			poller.stop();
		}
		if (executor != null) {
			try {
				executor.shutdown();
			} catch (Exception ignored) {
			}
			executor = null;
		}
		if (poller != null) {
			poller = null;
		}
		if (producer != null) {
			try {
				producer.close(10, TimeUnit.SECONDS);
			} catch (Exception ignored) {
			}
			producer = null;
		}
	}
1045531
async def disconnect(self, *, force=False):
        
        if not force and not self.is_connected():
            return

        self.stop()
        self._connected.clear()

        try:
            if self.ws:
                await self.ws.close()

            await self.terminate_handshake(remove=True)
        finally:
            if self.socket:
                self.socket.close()
651925
def disconnect(self):
        '''
        
        '''
        if not hasattr(self, '_sock'):
            return

        # TODO: If there are bytes left on the output, queue the close for
        # later.
        self._sock.close_cb = None
        self._sock.close()
1258364
private void disconnect(ZMQ.Socket socket, String eventName){
        String   endpoint = getConnectedEndPoint(eventName);
        if (endpoint!=null) {
            EventList eventList = connectedMap.get(endpoint);
            if (eventList!=null) {
                socket.unsubscribe(eventName.getBytes());
                traceZmqSubscription(eventName, false);
                eventList.remove(eventName);
                if (eventList.size()==0) {
                    socket.disconnect(endpoint);
                    connectedMap.remove(endpoint);
                }
            }
        }
    }
346539
def _removeReceiver(receiver):
    """"""
    if not sendersBack:
        # During module cleanup the mapping will be replaced with None
        return False
    backKey = id(receiver)
    try:
        backSet = sendersBack.pop(backKey)
    except KeyError:
        return False 
    else:
        for senderkey in backSet:
            try:
                signals = list(connections[senderkey].keys())
            except KeyError:
                pass
            else:
                for signal in signals:
                    try:
                        receivers = connections[senderkey][signal]
                    except KeyError:
                        pass
                    else:
                        try:
                            receivers.remove( receiver )
                        except Exception:
                            pass
                    _cleanupConnections(senderkey, signal)
967746
def disconnect(self):
        """"""
        # here we just request the disconnection
        # later in _handle_eio_disconnect we invoke the disconnect handler
        for n in self.namespaces:
            self._send_packet(packet.Packet(packet.DISCONNECT, namespace=n))
        self._send_packet(packet.Packet(
            packet.DISCONNECT, namespace='/'))
        self.eio.disconnect(abort=True)
850040
public function disconnect()
  {
    if($this->stream === null) return;

    $this->stream = null;

    TeamSpeak3_Helper_Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "Disconnected");
  }
93916
def disconnect_from(callback, signals):
    
    # Support for lists of signals
    if not isinstance(signals, (list, tuple)):
        signals = [signals]

    # Remove callback from receiver list if it responds to the signal
    for signal in signals:
        if responds_to(callback, signal):
            receivers[signal].remove(callback)