mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
output Exit when new service exit
This commit is contained in:
@@ -143,7 +143,11 @@ end
|
|||||||
function COMMAND.start(fd, ...)
|
function COMMAND.start(fd, ...)
|
||||||
local ok, addr = pcall(skynet.newservice, ...)
|
local ok, addr = pcall(skynet.newservice, ...)
|
||||||
if ok then
|
if ok then
|
||||||
return { [skynet.address(addr)] = ... }
|
if addr then
|
||||||
|
return { [skynet.address(addr)] = ... }
|
||||||
|
else
|
||||||
|
return "Exit"
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return "Failed"
|
return "Failed"
|
||||||
end
|
end
|
||||||
@@ -152,7 +156,11 @@ end
|
|||||||
function COMMAND.log(fd, ...)
|
function COMMAND.log(fd, ...)
|
||||||
local ok, addr = pcall(skynet.call, ".launcher", "lua", "LOGLAUNCH", "snlua", ...)
|
local ok, addr = pcall(skynet.call, ".launcher", "lua", "LOGLAUNCH", "snlua", ...)
|
||||||
if ok then
|
if ok then
|
||||||
return { [skynet.address(addr)] = ... }
|
if addr then
|
||||||
|
return { [skynet.address(addr)] = ... }
|
||||||
|
else
|
||||||
|
return "Failed"
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return "Failed"
|
return "Failed"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user