From d982009260a16403f33cace61c2178b67bea6dc2 Mon Sep 17 00:00:00 2001 From: David Feng Date: Wed, 27 Jan 2016 10:35:40 +0800 Subject: [PATCH] fix --- lualib/skynet/remotedebug.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lualib/skynet/remotedebug.lua b/lualib/skynet/remotedebug.lua index 7cfe19eb..72a06809 100644 --- a/lualib/skynet/remotedebug.lua +++ b/lualib/skynet/remotedebug.lua @@ -140,10 +140,13 @@ end local function watch_proto(protoname, cond) local proto = assert(replace_upvalue(skynet.register_protocol, "proto"), "Can't find proto table") local p = proto[protoname] - local dispatch = p.dispatch_origin or p.dispatch - if p == nil or dispatch == nil then + if p == nil then return "No " .. protoname end + local dispatch = p.dispatch_origin or p.dispatch + if dispatch == nil then + return "No dispatch" + end p.dispatch_origin = dispatch p.dispatch = function(...) if not cond or cond(...) then