Post ZeroconfServiceRemovedEvent also if the zeroconf_info object has already been deallocated
This commit is contained in:
parent
ddedcd647c
commit
d8f7b15111
1 changed files with 5 additions and 2 deletions
|
@ -368,8 +368,11 @@ class Backend(Thread, EventGenerator):
|
|||
if self.zeroconf:
|
||||
self.zeroconf.close()
|
||||
|
||||
self.bus.post(ZeroconfServiceRemovedEvent(service_type=self.zeroconf_info.type,
|
||||
service_name=self.zeroconf_info.name))
|
||||
if self.zeroconf_info:
|
||||
self.bus.post(ZeroconfServiceRemovedEvent(service_type=self.zeroconf_info.type,
|
||||
service_name=self.zeroconf_info.name))
|
||||
else:
|
||||
self.bus.post(ZeroconfServiceRemovedEvent())
|
||||
|
||||
self.zeroconf_info = None
|
||||
self.zeroconf = None
|
||||
|
|
Loading…
Reference in a new issue