def close(self):
    self._logger.info('Close the connection')
    try:
        self.write(messages.Terminate())
    finally:
        self.close_socket()
def close(self):
    self._logger.info('Close the connection')
    try:
        self.write(messages.Terminate())
    finally:
        self.close_socket()