Revert "避免失败卡住"

This reverts commit 77e2643728.
This commit is contained in:
云风
2019-04-18 15:40:09 +08:00
parent 77e2643728
commit 201becd3d1

View File

@@ -11,19 +11,16 @@ local function get_sender(t, node)
local co=coroutine.running()
table.insert(waitco, co)
skynet.wait(co)
return assert(rawget(t, node))
return rawget(t, node)
else
waitco = {}
inquery_name[node] = waitco
local ok,c = pcall(skynet.call, clusterd, "lua", "sender", node)
if ok then
t[node] = c
end
local c = skynet.call(clusterd, "lua", "sender", node)
inquery_name[node] = nil
t[node] = c
for _, co in ipairs(waitco) do
skynet.wakeup(co)
end
assert(ok,c)
return c
end
end