Skip to content
Snippets Groups Projects
Commit 5cf072a9 authored by sb's avatar sb
Browse files

properly disconnect from dbus when calling disconnect()

parent f5e00e91
No related branches found
No related tags found
No related merge requests found
......@@ -72,9 +72,9 @@ class Zeroconf:
reply_handler=self.service_resolved_callback, error_handler=self.print_error_callback)
def remove_service_callback(self, interface, protocol, name, stype, domain, flags):
# print "Service '%s' in domain '%s' on %i.%i disappeared." % (name, domain, interface, protocol)
if not self.connected:
return
print "Service '%s' in domain '%s' on %i.%i disappeared." % (name, domain, interface, protocol)
#if not self.connected:
# return
if name != self.name:
for key in self.contacts.keys():
if self.contacts[key][C_BARE_NAME] == name:
......@@ -286,6 +286,8 @@ class Zeroconf:
def disconnect(self):
if self.connected:
self.connected = False
self.service_browser.Free()
self.service_browser = None
self.remove_announce()
# refresh txt data of all contacts manually (no callback available)
......
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