From 85749f8a8b74e871d7b4bf06a7837899242f3bb2 Mon Sep 17 00:00:00 2001 From: souliane Date: Fri, 9 Jan 2015 10:45:15 +0100 Subject: [PATCH] plugin XEP-0060: free SatPubSubClient instance on profile disconnection --- src/plugins/plugin_xep_0060.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/plugin_xep_0060.py b/src/plugins/plugin_xep_0060.py index e840b70e..30595b8c 100755 --- a/src/plugins/plugin_xep_0060.py +++ b/src/plugins/plugin_xep_0060.py @@ -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)