Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/nbxmpp
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2020-09-25 18:09:34 +0300
committerlovetox <philipp@hoerist.com>2020-09-25 18:09:34 +0300
commitaa7791fe3faff1ebe1e205faba7d93a268647afd (patch)
tree86212b6cf3dcbcafe09f64aa2b8ba09acc603998 /nbxmpp
parent29212faaaa0472960770553b3b06d20d067689c8 (diff)
TCP: Catch RuntimeError also on _on_read_async_finish()
Diffstat (limited to 'nbxmpp')
-rw-r--r--nbxmpp/tcp.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/nbxmpp/tcp.py b/nbxmpp/tcp.py
index e661a8c..f39da27 100644
--- a/nbxmpp/tcp.py
+++ b/nbxmpp/tcp.py
@@ -226,6 +226,12 @@ class TCPConnection(Connection):
self._finalize('disconnected')
return
+ except RuntimeError as error:
+ # PyGObject raises a RuntimeError when it fails to convert the
+ # GError. Why it failed is printed by PyGObject
+ self._log.error(error)
+ return
+
data = data.get_data()
if not data:
if self._state == TCPState.DISCONNECTING:
@@ -287,9 +293,8 @@ class TCPConnection(Connection):
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
+ # PyGObject raises a RuntimeError when it fails to convert the
+ # GError. Why it failed is printed by PyGObject
self._log.error(error)
return