diff sat/core/xmpp.py @ 3709:09f5ac48ffe3

merge bookmark @
author Goffi <goffi@goffi.org>
date Fri, 12 Nov 2021 17:21:24 +0100
parents 31628770a15a a806dcad6bfc
children b9718216a1c0
line wrap: on
line diff
--- a/sat/core/xmpp.py	Mon Sep 27 08:29:09 2021 +0200
+++ b/sat/core/xmpp.py	Fri Nov 12 17:21:24 2021 +0100
@@ -303,7 +303,11 @@
         self.streamInitialized()
 
     def _finish_connection(self, __):
-        self.conn_deferred.callback(None)
+        if self.conn_deferred.called:
+            # can happen in case of forced disconnection by server
+            log.debug(f"{self} has already been connected")
+        else:
+            self.conn_deferred.callback(None)
 
     def streamInitialized(self):
         """Called after _authd"""