def disconnect(self):
    if self.isconnected():
        _L.debug('BaseClient, request disconnect from server in %s', threading.current_thread().name)
        self.socket.shutdown(socket.SHUT_RD)
        if self.socket:
            self.socket.close()
            self.socket = None
        time.sleep(0.1)
def disconnect(self):
    if self.isconnected():
        _L.debug('BaseClient, request disconnect from server in %s', threading.current_thread().name)
        self.socket.shutdown(socket.SHUT_RD)
        if self.socket:
            self.socket.close()
            self.socket = None
        time.sleep(0.1)