diff --git a/src/common/zeroconf/connection_zeroconf.py b/src/common/zeroconf/connection_zeroconf.py index 07ff5db3f..d16f471ea 100644 --- a/src/common/zeroconf/connection_zeroconf.py +++ b/src/common/zeroconf/connection_zeroconf.py @@ -296,6 +296,7 @@ class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf): show=show)) else: # show notification that avahi or system bus is down + self.connected = 0 gajim.nec.push_incoming_event(OurShowEvent(None, conn=self, show='offline')) self.status = 'offline' diff --git a/src/common/zeroconf/zeroconf_avahi.py b/src/common/zeroconf/zeroconf_avahi.py index e2a7c1fd4..716d2e5a0 100644 --- a/src/common/zeroconf/zeroconf_avahi.py +++ b/src/common/zeroconf/zeroconf_avahi.py @@ -277,9 +277,10 @@ class Zeroconf: state = self.server.GetState() if state == self.avahi.SERVER_RUNNING: - self.create_service() - self.announced = True - return True + if self.create_service(): + self.announced = True + return True + return False def remove_announce(self): if self.announced == False: