bugfix: multicast chan gc

This commit is contained in:
Cloud Wu
2015-07-29 16:10:38 +08:00
parent 7b54e37d12
commit b3f966bcaa

View File

@@ -8,7 +8,9 @@ local dispatch = setmetatable({} , {__mode = "kv" })
local chan = {} local chan = {}
local chan_meta = { local chan_meta = {
__index = chan, __index = chan,
__gc = unsubscribe, __gc = function(self)
self:unsubscribe()
end,
__tostring = function (self) __tostring = function (self)
return string.format("[Multicast:%x]",self.channel) return string.format("[Multicast:%x]",self.channel)
end, end,