Commit 0dee8510 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

TCP: Add more debug logging

parent aa7791fe
......@@ -244,7 +244,15 @@ class TCPConnection(Connection):
self._renew_keepalive_timer()
self._read_buffer += data
data, self._read_buffer = utf8_decode(self._read_buffer)
try:
data, self._read_buffer = utf8_decode(self._read_buffer)
except UnicodeDecodeError as error:
self._log.warning(error)
self._log.warning('read buffer: "%s"', self._read_buffer)
self._log.warning('data: "%s"', data)
self._finalize('disconnected')
return
self._log_stanza(data, received=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment