mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
skynet.kill move into skynet.manager
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
local skynet = require "skynet"
|
local skynet = require "skynet"
|
||||||
local netpack = require "netpack"
|
local netpack = require "netpack"
|
||||||
|
require "skynet.manager"
|
||||||
|
|
||||||
local CMD = {}
|
local CMD = {}
|
||||||
local SOCKET = {}
|
local SOCKET = {}
|
||||||
@@ -15,6 +16,7 @@ end
|
|||||||
local function close_agent(fd)
|
local function close_agent(fd)
|
||||||
local a = agent[fd]
|
local a = agent[fd]
|
||||||
if a then
|
if a then
|
||||||
|
-- The better way is send a message to agent, and let agent exit self.
|
||||||
skynet.kill(a)
|
skynet.kill(a)
|
||||||
agent[fd] = nil
|
agent[fd] = nil
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user