Never throw error when sending message to invalid address

This commit is contained in:
云风
2013-09-12 16:22:49 +08:00
parent 0a584d5872
commit 36676afc03

View File

@@ -309,7 +309,8 @@ _send(lua_State *L) {
luaL_error(L, "skynet.send invalid param %s", lua_type(L,4)); luaL_error(L, "skynet.send invalid param %s", lua_type(L,4));
} }
if (session < 0) { if (session < 0) {
luaL_error(L, "skynet.send session (%d) < 0", session); // send to invalid address
return 0;
} }
lua_pushinteger(L,session); lua_pushinteger(L,session);
return 1; return 1;