def close(self, msg='quit'): """Closes the connection with the server by sending 'quit' to cleanly close the connection.""" if msg: try: self.sendCmd('quit', readresp=0) # it's possible that we are already disconnected except Sockets.SocketError: pass ClientServerSocket.close(self)
def close(self, msg='quit'): """Close the connection with server.""" # if this is a keepalive connection then make sure we tell the # server that we are done. if self.keepalive and msg: try: self.send({'close': msg}, timeout=self.timeout) # it's possible that we are already disconnected except Sockets.SocketError: pass ClientServerSocket.close(self)