don't crash when we cannot connect to avahi. Fixes #7607
This commit is contained in:
parent
3cbb9df77b
commit
309e7caf8a
|
@ -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'
|
||||
|
|
|
@ -277,9 +277,10 @@ class Zeroconf:
|
|||
|
||||
state = self.server.GetState()
|
||||
if state == self.avahi.SERVER_RUNNING:
|
||||
self.create_service()
|
||||
if self.create_service():
|
||||
self.announced = True
|
||||
return True
|
||||
return False
|
||||
|
||||
def remove_announce(self):
|
||||
if self.announced == False:
|
||||
|
|
Loading…
Reference in New Issue