Print received error messages

This commit is contained in:
TheKysek 2017-05-25 12:09:20 +02:00
parent be6356db6d
commit 3cb7157afd
No known key found for this signature in database
GPG Key ID: 50D9AF00D0B1C497

View File

@ -284,6 +284,8 @@ class Connection(threading.Thread):
elif m.command == b'ping': elif m.command == b'ping':
logging.debug('{}:{} -> ping'.format(self.host, self.port)) logging.debug('{}:{} -> ping'.format(self.host, self.port))
self.send_queue.put(message.Message(b'pong', b'')) self.send_queue.put(message.Message(b'pong', b''))
elif m.command == b'error':
logging.error('{}:{} -> error: {}'.format(self.host, self.port, m.payload))
else: else:
logging.debug('{}:{} -> {}'.format(self.host, self.port, m)) logging.debug('{}:{} -> {}'.format(self.host, self.port, m))