mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
throw error when skynet.exit
This commit is contained in:
@@ -253,6 +253,13 @@ end
|
||||
|
||||
function skynet.exit()
|
||||
skynet.send(".launcher","lua","REMOVE",skynet.self())
|
||||
for co, session in pairs(session_coroutine_id) do
|
||||
local address = session_coroutine_address[co]
|
||||
local self = skynet.self()
|
||||
if session~=0 and address then
|
||||
skynet.redirect(self, address, "error", session, "")
|
||||
end
|
||||
end
|
||||
c.command("EXIT")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user