This commit is contained in:
Cloud Wu
2017-06-02 19:16:36 +08:00
parent 5aa3ed8d8f
commit 624fbf6f22

View File

@@ -281,12 +281,17 @@ function COMMANDX.debug(cmd)
end
skynet.fork(function()
pcall(forward_cmd)
skynet.wakeup(term_co)
if not stop then -- block at skynet.call "start"
term_co = nil
skynet.wakeup(term_co)
end
end)
local ok, err = skynet.call(agent, "lua", "start", address, cmd.fd)
stop = true
-- wait for fork coroutine exit.
skynet.wait(term_co)
if term_co then
-- wait for fork coroutine exit.
skynet.wait(term_co)
end
if not ok then
error(err)