fix a debug_console error

This commit is contained in:
m2q1n9
2015-12-25 17:24:50 +08:00
parent f0ac66787e
commit b9ad559992

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