mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 11:33:09 +00:00
bugfix isse #592
This commit is contained in:
@@ -10,9 +10,13 @@ function CMD.start(address, fd)
|
||||
skynet.error(string.format("Attach to :%08x", address))
|
||||
local handle
|
||||
channel, handle = debugchannel.create()
|
||||
skynet.call(address, "debug", "REMOTEDEBUG", fd, handle)
|
||||
-- todo hook
|
||||
skynet.ret(skynet.pack(nil))
|
||||
local ok, err = pcall(skynet.call, address, "debug", "REMOTEDEBUG", fd, handle)
|
||||
if not ok then
|
||||
skynet.ret(skynet.pack(false, "Debugger attach failed"))
|
||||
else
|
||||
-- todo hook
|
||||
skynet.ret(skynet.pack(true))
|
||||
end
|
||||
skynet.exit()
|
||||
end
|
||||
|
||||
@@ -20,6 +24,10 @@ function CMD.cmd(cmdline)
|
||||
channel:write(cmdline)
|
||||
end
|
||||
|
||||
function CMD.ping()
|
||||
skynet.ret()
|
||||
end
|
||||
|
||||
skynet.start(function()
|
||||
skynet.dispatch("lua", function(_,_,cmd,...)
|
||||
local f = CMD[cmd]
|
||||
|
||||
Reference in New Issue
Block a user