From b8c54cbac270caf98c57bada2ad02314f9d40c9e Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Wed, 27 May 2015 21:17:43 +0800 Subject: [PATCH] skynet.kill move into skynet.manager --- examples/watchdog.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/watchdog.lua b/examples/watchdog.lua index e02af169..32bceed5 100644 --- a/examples/watchdog.lua +++ b/examples/watchdog.lua @@ -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