def cleanup(self):
        if self.sock:
            INTERNAL_LOG.info('Closing socket')
            self.sock.close()
            self.sock = None
If the socket to the server is still open, close it. Otherwise, do
dataset/ETHPy150Open uber/clay/clay/logger.py/TCPHandler.cleanup