Commit 9b95af1f authored by Yann Leboulanger's avatar Yann Leboulanger

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

parent 34c889ca
......@@ -297,6 +297,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'
......
......@@ -284,9 +284,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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment