From d2ab6863e3a23920d1926064d05c16d0a747de9b Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Tue, 7 Aug 2018 10:49:21 +0800 Subject: [PATCH] fix #872 --- lualib/skynet/multicast.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lualib/skynet/multicast.lua b/lualib/skynet/multicast.lua index 21ebf974..1c76b877 100644 --- a/lualib/skynet/multicast.lua +++ b/lualib/skynet/multicast.lua @@ -3,7 +3,7 @@ local mc = require "skynet.multicast.core" local multicastd local multicast = {} -local dispatch = setmetatable({} , {__mode = "kv" }) +local dispatch = {} local chan = {} local chan_meta = { @@ -70,6 +70,7 @@ function chan:unsubscribe() local c = assert(self.channel) skynet.send(multicastd, "lua", "USUB", c) self.__subscribe = nil + dispatch[c] = nil end local function dispatch_subscribe(channel, source, pack, msg, sz)