From e5e73c2efe2057660854c78d596afa50004815aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E9=A3=8E?= Date: Wed, 18 Sep 2013 16:42:23 +0800 Subject: [PATCH] return 0 when send to an invalid address --- lualib-src/lua-skynet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lualib-src/lua-skynet.c b/lualib-src/lua-skynet.c index 8e1631ab..de4c6421 100644 --- a/lualib-src/lua-skynet.c +++ b/lualib-src/lua-skynet.c @@ -302,7 +302,8 @@ _send(lua_State *L) { } if (session < 0) { // send to invalid address - return 0; + // todo: maybe throw error is better + session = 0; } lua_pushinteger(L,session); return 1;