From bad3472124e0dce5ca8ff76691e2bafe18b787ae Mon Sep 17 00:00:00 2001 From: snail Date: Sun, 30 Aug 2015 16:47:34 +0800 Subject: [PATCH] 'response' not released 'response' not released after src service died, and defined error. --- lualib/skynet.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lualib/skynet.lua b/lualib/skynet.lua index e4f46908..56d62e6c 100644 --- a/lualib/skynet.lua +++ b/lualib/skynet.lua @@ -186,10 +186,12 @@ function suspend(co, result, command, param, size) error(debug.traceback(co)) end local f = param - local function response(ok, ...) + local response + response = function(ok, ...) if ok == "TEST" then if dead_service[co_address] then release_watching(co_address) + unresponse[response] = nil f = false return false else @@ -224,7 +226,7 @@ function suspend(co, result, command, param, size) return ret end watching_service[co_address] = watching_service[co_address] + 1 - session_response[co] = response + session_response[co] = true unresponse[response] = true return suspend(co, coroutine.resume(co, response)) elseif command == "EXIT" then