Skip to content
Snippets Groups Projects
Commit 309e7caf authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

don't crash when we cannot connect to avahi. Fixes #7607

parent 3cbb9df7
No related branches found
No related tags found
No related merge requests found
...@@ -296,6 +296,7 @@ class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf): ...@@ -296,6 +296,7 @@ class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf):
show=show)) show=show))
else: else:
# show notification that avahi or system bus is down # show notification that avahi or system bus is down
self.connected = 0
gajim.nec.push_incoming_event(OurShowEvent(None, conn=self, gajim.nec.push_incoming_event(OurShowEvent(None, conn=self,
show='offline')) show='offline'))
self.status = 'offline' self.status = 'offline'
......
...@@ -277,9 +277,10 @@ class Zeroconf: ...@@ -277,9 +277,10 @@ class Zeroconf:
state = self.server.GetState() state = self.server.GetState()
if state == self.avahi.SERVER_RUNNING: if state == self.avahi.SERVER_RUNNING:
self.create_service() if self.create_service():
self.announced = True self.announced = True
return True return True
return False
def remove_announce(self): def remove_announce(self):
if self.announced == False: if self.announced == False:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment