Skip to content

Commit

Permalink
output Exit when new service exit
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwu committed May 6, 2016
1 parent 84b08bf commit 6cc558b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions service/debug_console.lua
Expand Up @@ -143,7 +143,11 @@ end
function COMMAND.start(fd, ...)
local ok, addr = pcall(skynet.newservice, ...)
if ok then
return { [skynet.address(addr)] = ... }
if addr then
return { [skynet.address(addr)] = ... }
else
return "Exit"
end
else
return "Failed"
end
Expand All @@ -152,7 +156,11 @@ end
function COMMAND.log(fd, ...)
local ok, addr = pcall(skynet.call, ".launcher", "lua", "LOGLAUNCH", "snlua", ...)
if ok then
return { [skynet.address(addr)] = ... }
if addr then
return { [skynet.address(addr)] = ... }
else
return "Failed"
end
else
return "Failed"
end
Expand Down

0 comments on commit 6cc558b

Please sign in to comment.