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
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2020-03-24 00:15:37 +0300
committerlovetox <philipp@hoerist.com>2020-03-24 00:17:43 +0300
commit7fca95381821c3f247c5e79da3865fb2df0a695b (patch)
tree61816bc0244d6d2acca1ac3461ac1c5873181310
parent3e5e6efc2a6169266ff3307bb0460059510aefd3 (diff)
TCP: Disconnect on all not handled read errors
-rw-r--r--nbxmpp/tcp.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nbxmpp/tcp.py b/nbxmpp/tcp.py
index e84e073..802654f 100644
--- a/nbxmpp/tcp.py
+++ b/nbxmpp/tcp.py
@@ -214,6 +214,10 @@ class TCPConnection(Connection):
return
self._log.error('Read Error: %s', error)
+
+ if self._state not in (TCPState.DISCONNECTING,
+ TCPState.DISCONNECTED):
+ self._finalize('disconnected')
return
data = data.get_data()