From 7fb109dbb03b955dfeceffb82a4fcc14e87a3126 Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Mon, 1 Jun 2015 10:57:30 +0800 Subject: [PATCH] See Issue #284 --- lualib/skynet/inject.lua | 2 +- service/debug_console.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lualib/skynet/inject.lua b/lualib/skynet/inject.lua index f3ef65d2..3c87bbb3 100644 --- a/lualib/skynet/inject.lua +++ b/lualib/skynet/inject.lua @@ -44,7 +44,7 @@ return function(skynet, source, filename , ...) if proto then for k,v in pairs(proto) do local name, dispatch = v.name, v.dispatch - if name and dispatch then + if name and dispatch and not p[name] then local pp = {} p[name] = pp getupvaluetable(pp, dispatch, unique) diff --git a/service/debug_console.lua b/service/debug_console.lua index 142cf601..139e76bb 100644 --- a/service/debug_console.lua +++ b/service/debug_console.lua @@ -171,7 +171,7 @@ end local function adjust_address(address) if address:sub(1,1) ~= ":" then - address = tonumber("0x" .. address) | (skynet.harbor(skynet.self()) << 24) + address = assert(tonumber("0x" .. address), "Need an address") | (skynet.harbor(skynet.self()) << 24) end return address end