mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
fix issue #648
This commit is contained in:
@@ -281,12 +281,17 @@ function COMMANDX.debug(cmd)
|
|||||||
end
|
end
|
||||||
skynet.fork(function()
|
skynet.fork(function()
|
||||||
pcall(forward_cmd)
|
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)
|
end)
|
||||||
local ok, err = skynet.call(agent, "lua", "start", address, cmd.fd)
|
local ok, err = skynet.call(agent, "lua", "start", address, cmd.fd)
|
||||||
stop = true
|
stop = true
|
||||||
-- wait for fork coroutine exit.
|
if term_co then
|
||||||
skynet.wait(term_co)
|
-- wait for fork coroutine exit.
|
||||||
|
skynet.wait(term_co)
|
||||||
|
end
|
||||||
|
|
||||||
if not ok then
|
if not ok then
|
||||||
error(err)
|
error(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user