diff options
author | lovetox <philipp@hoerist.com> | 2020-03-24 00:15:37 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2020-03-24 00:17:43 +0300 |
commit | 7fca95381821c3f247c5e79da3865fb2df0a695b (patch) | |
tree | 61816bc0244d6d2acca1ac3461ac1c5873181310 /nbxmpp | |
parent | 3e5e6efc2a6169266ff3307bb0460059510aefd3 (diff) |
TCP: Disconnect on all not handled read errors
Diffstat (limited to 'nbxmpp')
-rw-r--r-- | nbxmpp/tcp.py | 4 |
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() |