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))
|
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:
|
||||||
|
|
||||||
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:
|
||||||
|
|
Loading…
Reference in New Issue