From 8924b86ad7231e52b44d6dc8c06ab3d58d25f77e Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Thu, 8 Oct 2015 15:15:35 +0800 Subject: [PATCH] check empty group, See pr #351 --- service/multicastd.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/multicastd.lua b/service/multicastd.lua index 7bafab78..2ff1a7f0 100644 --- a/service/multicastd.lua +++ b/service/multicastd.lua @@ -67,7 +67,7 @@ end -- for remote node, call remote_publish. (call mc.unpack and skynet.tostring to convert message pointer to string) local function publish(c , source, pack, size) local group = channel[c] - if group == nil then + if group == nil or next(group) == nil then -- dead channel, delete the pack. mc.bind returns the pointer in pack local pack = mc.bind(pack, 1) mc.close(pack)