diff options
author | lovetox <philipp@hoerist.com> | 2020-08-14 13:47:43 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2020-08-15 09:42:45 +0300 |
commit | c0b512fe91cbdceae2f31408b19e7a4173bc572e (patch) | |
tree | 85e1eafc96955e2538557e373611a9bb217dcd29 | |
parent | 29d4261e7baed998c564d5e104b61b348d7f9640 (diff) |
TCP: Catch Runtime error
Fixes #101
-rw-r--r-- | nbxmpp/tcp.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nbxmpp/tcp.py b/nbxmpp/tcp.py index ff91c6b..7c6b6b7 100644 --- a/nbxmpp/tcp.py +++ b/nbxmpp/tcp.py @@ -286,6 +286,13 @@ class TCPConnection(Connection): self._log.error('Write Error: %s', error) return + except RuntimeError as error: + # PyGObject raises a RuntimeError when it failed to for some reason + # to convert the GError. Why it failed to convert is printed by + # PyGObject + self._log.error(error) + return + data = data.decode() self._log_stanza(data, received=False) |