Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
5ac9a4b9 by Philipp Hörist at 2022-09-28T21:50:41+02:00
fix: TCP: Improve detection of broken connection

Issue a disconnected signal on any zero data read

- - - - -


1 changed file:

- nbxmpp/tcp.py


Changes:

=====================================
nbxmpp/tcp.py
=====================================
@@ -257,11 +257,8 @@ class TCPConnection(Connection):
 
         data = data.get_data()
         if not data:
-            if self._state == TCPState.DISCONNECTING:
-                self._log.info('Reveived zero data on _read_async()')
-                self._finalize('disconnected')
-            else:
-                self._log.warning('Reveived zero data on _read_async()')
+            self._log.info('Reveived zero data on _read_async()')
+            self._finalize('disconnected')
             return
 
         self._renew_keepalive_timer()



View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/5ac9a4b900616dce521ce6907ed2d9a495f36179

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/5ac9a4b900616dce521ce6907ed2d9a495f36179
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to