not work with telnet due to \r\n

This commit is contained in:
felixdae
2015-08-07 18:36:30 +08:00
parent 1c7d44fd4d
commit c16ae57639

View File

@@ -228,6 +228,7 @@ function COMMAND.debug(address, fd)
skynet.fork(function()
repeat
local cmdline = socket.readline(fd, "\n")
cmdline = cmdline:gsub("(.*)\r$", "%1")
if not cmdline then
skynet.send(agent, "lua", "cmd", "cont")
break