plugin XEP-0060: free SatPubSubClient instance on profile disconnection

This commit is contained in:
souliane 2015-01-09 10:45:15 +01:00
commit 85749f8a8b

View file

@ -65,6 +65,12 @@ class XEP_0060(object):
self.clients[profile] = SatPubSubClient(self.host, self)
return self.clients[profile]
def profileDisconnected(self, profile):
try:
del self.clients[profile]
except KeyError:
pass
def addManagedNode(self, node_name, callback):
"""Add a handler for a namespace
@param namespace: NS of the handler (will appear in disco info)