Disconnect a channel with destination_id.
357139
def disconnect_channel(self, destination_id):
        
        if destination_id in self._open_channels:
            try:
                self.send_message(
                    destination_id, NS_CONNECTION,
                    {MESSAGE_TYPE: TYPE_CLOSE, 'origin': {}},
                    no_add_request_id=True, force=True)
            except NotConnected:
                pass
            except Exception:  # pylint: disable=broad-except
                self.logger.exception("[%s:%s] Exception",
                                      self.fn or self.host, self.port)

            self._open_channels.remove(destination_id)

            self.handle_channel_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)
73576
def _handle_eio_disconnect(self, sid):
        """"""
        self._handle_disconnect(sid, '/')
        if sid in self.environ:
            del self.environ[sid]
538781
def _disconnect(self):
        """"""
        if not self.protocol or not self.protocol.transport:
            self.protocol = None  # Make sure protocol is None
            return
        _LOGGER.info('Disconnecting from gateway')
        self.protocol.transport.close()
        self.protocol = None
239232
def disconnect_entry_signals():
    
    post_save.disconnect(
        sender=Entry,
        dispatch_uid=ENTRY_PS_PING_DIRECTORIES)
    post_save.disconnect(
        sender=Entry,
        dispatch_uid=ENTRY_PS_PING_EXTERNAL_URLS)
    post_save.disconnect(
        sender=Entry,
        dispatch_uid=ENTRY_PS_FLUSH_SIMILAR_CACHE)
    post_delete.disconnect(
        sender=Entry,
        dispatch_uid=ENTRY_PD_FLUSH_SIMILAR_CACHE)
1309752
def disconnect(self):
        """"""
        _LOGGING.debug('Disconnecting from stream: %s', self.name)
        self.kill_thrd.set()
        self.thrd.join()
        _LOGGING.debug('Event stream thread for %s is stopped', self.name)
        self.kill_thrd.clear()
1251581
def cancel(self):
        """"""
        if self.channel_open:
            try:
                self.backend.cancel(self.consumer_tag)
            except KeyError:
                pass
448519
def disconnect_async(self, conn_id, callback):
        """"""

        future = self._loop.launch_coroutine(self._adapter.disconnect(conn_id))
        future.add_done_callback(lambda x: self._callback_future(conn_id, x, callback))
493094
def quit(self):
        
        
        for c in self.channels:
            c.users.remove(self.nick)
        self.channels = []
442912
def stop_listening(cls, event, func):
        """"""
        signal(event).disconnect(func, sender=cls)
117207
def disconnect(self, signal, slot):
        
        sig_calls = self._callbacks.get(signal, [])
        for callback in sig_calls:
            if callback == slot:
                sig_calls.remove(callback)
                return True
        return False
467879
def disconnect(self, *args, **kwargs):
        """"""
        self.logged_on = False
        CMClient.disconnect(self, *args, **kwargs)
1259451
def disconnect(self):
        
        if hasattr(self, '_lazy_sftp'):
            if self.sftp is not None:
                self.sftp.close()
            delattr(self, '_lazy_sftp')
        if hasattr(self, '_lazy_channel'):
            if self.channel is not None:
                self.channel.close()
            delattr(self, '_lazy_channel')
        if hasattr(self, '_lazy_cli'):
            if self.cli is not None:
                self.cli.close()
            delattr(self, '_lazy_cli')
        if hasattr(self, '_lazy_pbm'):
            if self.pbm is not None:
                self.pbm.close()
            delattr(self, '_lazy_pbm')
        if hasattr(self, '_lazy_rpyc'):
            if self.rpyc is not None:
                self.rpyc.close()
            delattr(self, '_lazy_rpyc')
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)
481851
def remove_dnc(self, obj_id, channel):
        
        response = self._client.session.post(
            '{url}/{id}/dnc/remove/{channel}'.format(
                url=self.endpoint_url, id=obj_id, channel=channel
            )
        )
        return self.process_response(response)
224427
def close(self):
        """"""
        if self._channel and not self._channel.handler.channel_close:
            self._channel.close()
        self._channel_ref = None
956610
def disconnect(self):
        """"""
        if self._connected:
            self._connected = False
            self._conn.disconnect()