Disconnect the dongle from this SK8.

        Simply closes the active BLE connection to the device represented by the current instance.

        Returns:
            bool. True if connection was closed, False if not (e.g. if already closed).
195771
def disconnect(self):
        
        result = False
        logger.debug('SK8.disconnect({})'.format(self.conn_handle))
        if self.conn_handle >= 0:
            logger.debug('Calling dongle disconnect')
            result = self.dongle._disconnect(self.conn_handle)
            self.conn_handle = -1
            self.packets = 0

        return result
399202
def disconnect(self):
        
        cmd_response = self.__send_command(const.CMD_EXIT)
        if cmd_response.get('status'):
            self.is_connect = False
            if self.__sock:
                self.__sock.close()
            return True
        else:
            raise ZKErrorResponse("can't disconnect")
617885
def stop(self) -> None:
        
        if self._stopped:
            return
        self._stopped = True
        for fd, sock in self._sockets.items():
            assert sock.fileno() == fd
            # Unregister socket from IOLoop
            self._handlers.pop(fd)()
            sock.close()
85951
def disconnect(self, abandon_session=False):
        
        self.connected = False
        if (self.session and self.session.is_expired) or abandon_session:
            try:
                self.logout()
            except:
                log.warning(
                    'Logout call to responsys failed, session may have not been terminated',
                    exc_info=True
                )
            del self.session
        return True
1337178
def close(self):
        
        try:
            self._running = False
            self._read_thread.stop()
            self._device.close()

        except Exception:
            pass

        self.on_close()
350245
def disconnect(self):
        
        self._parser.on_disconnect()
        if self._sock is None:
            return
        try:
            self._sock.shutdown(socket.SHUT_RDWR)
            self._sock.close()
        except socket.error:
            pass
        self._sock = None
967053
def close(self):
        
        try:
            Device.close(self)

            # HACK: Probably should fork pyftdi and make this call in .close()
            self._device.usb_dev.attach_kernel_driver(self._device_number)

        except Exception:
            pass
345739
def _on_disconnect(self):
        

        self._logger.info("Connection to device %s was interrupted", self.connection_string)
        self.connection_interrupted = True
53760
def disconnect(self):
        
        if self.ibConn is not None:
            self.log.info("[DISCONNECT FROM IB]")
            self.ibConn.disconnect()
            self._disconnected_by_user = True
897954
def manual_close(self):
        
        if self.is_closed():
            return False

        # Obtain reference to the connection in-use by the calling thread.
        conn = self.connection()

        # A connection will only be re-added to the available list if it is
        # marked as "in use" at the time it is closed. We will explicitly
        # remove it from the "in use" list, call "close()" for the
        # side-effects, and then explicitly close the connection.
        self._in_use.pop(self.conn_key(conn), None)
        self.close()
        self._close(conn, close_conn=True)
1027022
def disconnect_socket(self):
        
        self.running = False
        if self.socket is not None:
            if self.__need_ssl():
                #
                # Even though we don't want to use the socket, unwrap is the only API method which does a proper SSL
                # shutdown
                #
                try:
                    self.socket = self.socket.unwrap()
                except Exception:
                    #
                    # unwrap seems flaky on Win with the back-ported ssl mod, so catch any exception and log it
                    #
                    _, e, _ = sys.exc_info()
                    log.warning(e)
            elif hasattr(socket, 'SHUT_RDWR'):
                try:
                    self.socket.shutdown(socket.SHUT_RDWR)
                except socket.error:
                    _, e, _ = sys.exc_info()
                    # ignore when socket already closed
                    if get_errno(e) != errno.ENOTCONN:
                        log.warning("Unable to issue SHUT_RDWR on socket because of error '%s'", e)

        #
        # split this into a separate check, because sometimes the socket is nulled between shutdown and this call
        #
        if self.socket is not None:
            try:
                self.socket.close()
            except socket.error:
                _, e, _ = sys.exc_info()
                log.warning("Unable to close socket because of error '%s'", e)
        self.current_host_and_port = None
        self.socket = None
        self.notify('disconnected')
557084
def serial_disconnect(self):
		
		if self._serial_connected:
			try:
				self.serial_connection.close()
			except c1218.errors.C1218IOError as error:
				self.logger.error('caught C1218IOError: ' + str(error))
			except serial.serialutil.SerialException as error:
				self.logger.error('caught SerialException: ' + str(error))
			self._serial_connected = False
			self.logger.warning('the serial interface has been disconnected')
		return True
284137
def disconnect(send_msg = true)
      # Stop reading packets from the socket first
      @read_thread.kill if @read_thread && @read_thread.alive?
      @read_thread = nil

      return unless connected?

      # Close the socket if it is open
      if send_msg
        packet = MQTT::Packet::Disconnect.new
        send_packet(packet)
      end
      @socket.close unless @socket.nil?
      @socket = nil
    end
696120
async def close(self):
        
        if self.__isClosed:
            return
        self.__isClosed = True
        self.__setSignalingState('closed')

        # stop senders / receivers
        for transceiver in self.__transceivers:
            await transceiver.stop()
        if self.__sctp:
            await self.__sctp.stop()

        # stop transports
        for transceiver in self.__transceivers:
            await transceiver._transport.stop()
            await transceiver._transport.transport.stop()
        if self.__sctp:
            await self.__sctp.transport.stop()
            await self.__sctp.transport.transport.stop()
        self.__updateIceConnectionState()

        # no more events will be emitted, so remove all event listeners
        # to facilitate garbage collection.
        self.remove_all_listeners()
1347739
def close(self):
        

        if not (yield from super().close()):
            return False

        self.acpi_shutdown = False
        yield from self.stop()

        for adapter in self._ethernet_adapters:
            if adapter is not None:
                for nio in adapter.ports.values():
                    if nio and isinstance(nio, NIOUDP):
                        self.manager.port_manager.release_udp_port(nio.lport, self._project)

        for udp_tunnel in self._local_udp_tunnels.values():
            self.manager.port_manager.release_udp_port(udp_tunnel[0].lport, self._project)
            self.manager.port_manager.release_udp_port(udp_tunnel[1].lport, self._project)
        self._local_udp_tunnels = {}
1296151
def close(self):
        
        self.is_closed = True
        try:
            self.smtp.quit()
        except (TypeError, AttributeError, smtplib.SMTPServerDisconnected):
            pass
888724
def _disconnect(self):
        
        try:
            self._connection.close()
            logger.debug("Disconnected from rabbit")
        except Exception:
            logger.exception("Unable to close connection")