redirect support alloc session

This commit is contained in:
Cloud Wu
2017-04-07 11:11:39 +08:00
parent 1f4a84edc2
commit 6fa241453c
3 changed files with 48 additions and 72 deletions

View File

@@ -331,7 +331,7 @@ function skynet.exit()
for co, session in pairs(session_coroutine_id) do
local address = session_coroutine_address[co]
if session~=0 and address then
c.redirect(address, 0, skynet.PTYPE_ERROR, session, "")
c.send(address, skynet.PTYPE_ERROR, session, "")
end
end
for resp in pairs(unresponse) do
@@ -343,7 +343,7 @@ function skynet.exit()
tmp[address] = true
end
for address in pairs(tmp) do
c.redirect(address, 0, skynet.PTYPE_ERROR, 0, "")
c.send(address, skynet.PTYPE_ERROR, 0, "")
end
c.command("EXIT")
-- quit service