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() local co=coroutine.running()
table.insert(waitco, co) table.insert(waitco, co)
skynet.wait(co) skynet.wait(co)
return assert(rawget(t, node)) return rawget(t, node)
else else
waitco = {} waitco = {}
inquery_name[node] = waitco inquery_name[node] = waitco
local ok,c = pcall(skynet.call, clusterd, "lua", "sender", node) local c = skynet.call(clusterd, "lua", "sender", node)
if ok then
t[node] = c
end
inquery_name[node] = nil inquery_name[node] = nil
t[node] = c
for _, co in ipairs(waitco) do for _, co in ipairs(waitco) do
skynet.wakeup(co) skynet.wakeup(co)
end end
assert(ok,c)
return c return c
end end
end end