changeset 1282:74d558e6c9fd

plugin XEP-0060: free SatPubSubClient instance on profile disconnection
author souliane <souliane@mailoo.org>
date Fri, 09 Jan 2015 10:45:15 +0100
parents 1c90a913fbb9
children 7d9ff14a2d9d
files src/plugins/plugin_xep_0060.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0060.py	Fri Jan 09 10:44:37 2015 +0100
+++ b/src/plugins/plugin_xep_0060.py	Fri Jan 09 10:45:15 2015 +0100
@@ -65,6 +65,12 @@
         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)