bugfix: double check in SUB

This commit is contained in:
Cloud Wu
2014-04-30 17:34:14 +08:00
parent 5d0da82d9a
commit 9033c5cdd9

View File

@@ -137,8 +137,11 @@ function command.SUB(source, c)
if skynet.call(node_address[node], "lua", "SUBR", c) then
return
end
channel[c] = {}
channel_n[c] = 0
if channel[c] == nil then
-- double check, because skynet.call whould yield, other SUB may occur.
channel[c] = {}
channel_n[c] = 0
end
end
end
local group = channel[c]