skynet.kill move into skynet.manager

This commit is contained in:
Cloud Wu
2015-05-27 21:17:43 +08:00
parent 3a2c43e9e0
commit b8c54cbac2

View File

@@ -1,5 +1,6 @@
local skynet = require "skynet"
local netpack = require "netpack"
require "skynet.manager"
local CMD = {}
local SOCKET = {}
@@ -15,6 +16,7 @@ end
local function close_agent(fd)
local a = agent[fd]
if a then
-- The better way is send a message to agent, and let agent exit self.
skynet.kill(a)
agent[fd] = nil
end