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

TCP: Catch RuntimeError also on _on_read_async_finish()

parent 29212faa
......@@ -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
......
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