Merge pull request #418 from m2q1n9/master

fix a debug_console error
This commit is contained in:
cloudwu
2015-12-28 00:15:29 +08:00

View File

@@ -231,7 +231,7 @@ function COMMAND.debug(address, fd)
skynet.fork(function()
repeat
local cmdline = socket.readline(fd, "\n")
cmdline = cmdline:gsub("(.*)\r$", "%1")
cmdline = cmdline and cmdline:gsub("(.*)\r$", "%1")
if not cmdline then
skynet.send(agent, "lua", "cmd", "cont")
break
@@ -275,5 +275,3 @@ function COMMAND.shrtbl()
local n, total, longest, space = memory.ssinfo()
return { n = n, total = total, longest = longest, space = space }
end