# HG changeset patch # User Kim Alvefur # Date 1507507075 -7200 # Node ID 6fd36e73082b17877230594cc98f1d54d5ea0616 # Parent df8c82d285dc7c84240f4510ca581ea03eb8e187 util.pubsub: Clear data on node deletion diff -r df8c82d285dc -r 6fd36e73082b util/pubsub.lua --- a/util/pubsub.lua Mon Oct 09 01:45:20 2017 +0200 +++ b/util/pubsub.lua Mon Oct 09 01:57:55 2017 +0200 @@ -244,6 +244,9 @@ return false, "item-not-found"; end self.nodes[node] = nil; + if self.data[node] and self.data[node].clear then + self.data[node]:clear(); + end self.data[node] = nil; self.events.fire_event("node-deleted", { node = node, actor = actor }); self.config.broadcaster("delete", node, node_obj.subscribers);