Closes the serial connection to the meter and disconnects from the
		device.
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
276891
def disconnect(self):
        """"""

        if not self.connected:
            raise HardwareError("Cannot disconnect when we are not connected")

        # Close the streaming and tracing interfaces when we disconnect
        self._reports = None
        self._traces = None

        self._loop.run_coroutine(self.adapter.disconnect(0))
        self.connected = False
        self.connection_interrupted = False
        self.connection_string = None
1289364
def close(self) -> None:
        
        def _shutdown() -> None:
            self.transport.close()
            self.shutdown_event.set()

        with self._shutdown_lock:
            if not self._shutdown:
                self._shutdown = True
                self.protocol.loop.call_soon_threadsafe(_shutdown)
717732
def close(self):
        ''''''
        if self.writer:
            _logger.debug('Closing connection.')
            self.writer.close()

            self.writer = None
            self.reader = None

        if self._close_timer:
            self._close_timer.close()

        self._state = ConnectionState.dead
1126501
def _close_connection(self):
        """"""
        if (self._mode == PROP_MODE_SERIAL):
            self._serial.close()
        elif (self._mode == PROP_MODE_TCP):
            self._socket.close()
        elif (self._mode == PROP_MODE_FILE):
            self._file.close()
110185
def disconnect(self):
        """"""
        # TODO Close the APs. When this is attempted, we get an undocumented 0x1d error. Doesn't
        #      seem to be necessary, anyway.
        self._memory_interfaces = {}
        
        self._link.enter_idle()
        self._is_connected = False
805794
async def close(self, event):
        """"""
        _LOGGER.info('Closing connection to Insteon Modem')
        self._closing = True
        self._auto_reconnect = False
        await self.protocol.close()
        if self.protocol.transport:
            self.protocol.transport.close()
        await asyncio.sleep(0, loop=self._loop)
        _LOGGER.info('Insteon Modem connection closed')
385477
def close(self):
        """"""
        # free parsed data
        if not self.is_opened():
            return
        self.__open_status = False

        # abort all running threads first
        if self.__reading_thread and self.__reading_thread.is_alive():
            self.__reading_thread.abort()

        #avoid posting new reports
        if self._input_report_queue:
            self._input_report_queue.release_events()

        if self.__input_processing_thread and \
                self.__input_processing_thread.is_alive():
            self.__input_processing_thread.abort()

        #properly close API handlers and pointers
        if self.ptr_preparsed_data:
            ptr_preparsed_data = self.ptr_preparsed_data
            self.ptr_preparsed_data = None
            hid_dll.HidD_FreePreparsedData(ptr_preparsed_data)

        # wait for the reading thread to complete before closing device handle
        if self.__reading_thread:
            self.__reading_thread.join()

        if self.hid_handle:
            winapi.CloseHandle(self.hid_handle)

        # make sure report procesing thread is closed
        if self.__input_processing_thread:
            self.__input_processing_thread.join()

        #reset vars (for GC)
        button_caps_storage = self.__button_caps_storage
        self.__reset_vars()

        while button_caps_storage:
            item = button_caps_storage.pop()
            del item
1156553
def disconnect(self):
        
        if self.connected:
            self._socket.close()
            self._socket = None
            self.connected = False
722196
def close(self):
        
        if self.device is not None and self.device.is_open:
            self.device.flush()
            self.device.close()
452469
def close_connection(self):
        
        if self.port:
            self.port.close()
            self.logger.debug("Close TCP port")
180531
public void disconnect(){
        if(timer != null){
            timer.cancel();
        }
        if (ws != null && ws.isOpen()) {
            ws.disconnect();
            subscribedTokens = new HashSet<>();
            modeMap.clear();
        }
    }
213084
def close(self):
        
        try:
            self.connection.close()
            self.connection = None
        except Exception:
            if not self.fail_silently:
                raise
192602
def close_connection(self):
        """"""
        self._logger.info('Closing connection')
        self._closing = True
        self._connection.close()
70829
def disconnect(self):
        
        self.ws.close()
        self.ingame = False
        self.subscriber.on_sock_closed()
143642
def _serial_close(self, port):
        '''
        
        '''
        if port in self.open_devices:
            try:
                self.open_devices[port].close()
            except Exception as exception:
                logger.error('Error closing device `%s`: %s', port, exception)
                return
        else:
            logger.debug('Device not connected to `%s`', port)
            self._publish_status(port)
            return
527373
protected void shutdown() {
        LOGGER.info("Shutting down SimulatorImpl");
        LOGGER.info("Cancelling timer thread");
        mTimer.cancel();
        mTimer = null;
        mSimulator = mPySimulator = null;
        mInterpreter = null;
    }