fix a bug , issue #592

This commit is contained in:
Cloud Wu
2017-04-12 17:04:58 +08:00
parent 8e7796a672
commit 61d13846cd

View File

@@ -269,7 +269,7 @@ function COMMANDX.debug(cmd)
local function forward_cmd()
repeat
-- notice : It's a bad practice to call socket.readline from two threads (this one and console_main_loop), be careful.
skynet.call(agent, "lua", "cmd", "ping") -- detect agent alive, if agent exit, raise error
skynet.call(agent, "lua", "ping") -- detect agent alive, if agent exit, raise error
local cmdline = socket.readline(cmd.fd, "\n")
cmdline = cmdline and cmdline:gsub("(.*)\r$", "%1")
if not cmdline then