Fix service disappearance
This commit is contained in:
parent
20d7582f1d
commit
21d1294c7a
@ -244,6 +244,14 @@ class PresenceService(gobject.GObject):
|
||||
|
||||
def _service_disappeared_cb(self, interface, protocol, name, stype, domain, flags):
|
||||
self._log("service '%s' of type '%s' in domain '%s' on %i.%i disappeared." % (name, stype, domain, interface, protocol))
|
||||
# If it's an unresolved service, remove it from our unresolved list
|
||||
found = self._find_service(self._unresolved_services, name=name,
|
||||
stype=stype, domain=domain)
|
||||
for service in found:
|
||||
self._unresolved_services.remove(service)
|
||||
|
||||
# Unresolved services by definition aren't assigned to a buddy
|
||||
if not len(found):
|
||||
try:
|
||||
# Remove the service from the buddy
|
||||
buddy = self._buddies[name]
|
||||
@ -257,8 +265,6 @@ class PresenceService(gobject.GObject):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
for service in found:
|
||||
self._unresolved_services.remove(service)
|
||||
return False
|
||||
|
||||
def _service_disappeared_cb_glue(self, interface, protocol, name, stype, domain, flags):
|
||||
|
Loading…
Reference in New Issue
Block a user