# HG changeset patch # User souliane # Date 1420796715 -3600 # Node ID 74d558e6c9fdf87c95df1536f11012de5002934b # Parent 1c90a913fbb941972decfc4e449b3db75b0c4b6b plugin XEP-0060: free SatPubSubClient instance on profile disconnection diff -r 1c90a913fbb9 -r 74d558e6c9fd src/plugins/plugin_xep_0060.py --- 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)