Cancel listeners when closing

Signed-off-by: Rahix <rahix@rahix.de>
dev
rahix 7 years ago
parent 11babfad9e
commit c27e889d45

@ -224,6 +224,15 @@ function BaseControl:close()
end end
end end
-- Cancel all listeners
for noun, listeners in pairs(self.listeners) do
if self.remote_nouns[noun] ~= nil then
for id in pairs(listeners) do
self:cancel(noun, id)
end
end
end
self.network:stop() self.network:stop()
setmetatable(self, nil) setmetatable(self, nil)
end end

Loading…
Cancel
Save