def disconnect(self): with self.lock: if self.socket: socket = self.socket self.socket = None socket.close() self.canvas.fire('DISCONNECT', self)
def close(self): if self._makefile_refs < 1: self._sock.shutdown() # QQQ wait until shutdown completes? socket.close(self) else: self._makefile_refs -= 1
def disconnect(self): with self.lock: if self.socket: socket = self.socket self.socket = None socket.close() log.info('Disconnect')
def process_command(self, client): socket, address = client try: processor = ClientProcessor(socket, address, debug=self.debug) processor.read_request() except (ValueError, TypeError) as exc: logging.error(exc) except Exception as exc: logging.error(exc) socket.close()
def close(self): if self._makefile_refs < 1: self._sslobj = None socket.close(self) else: self._makefile_refs -= 1
def do_close(self, socket, *args): socket.close()