diff --git a/lualib-src/lua-skynet.c b/lualib-src/lua-skynet.c index 931de581..0189b61b 100644 --- a/lualib-src/lua-skynet.c +++ b/lualib-src/lua-skynet.c @@ -149,7 +149,7 @@ _sendname(lua_State *L, struct skynet_context * context, const char * dest) { luaL_error(L, "skynet.send invalid param %s", lua_typename(L,lua_type(L,4))); } if (session < 0) { - luaL_error(L, "skynet.send session (%d) < 0", session); + return 0; } lua_pushinteger(L,session); return 1; diff --git a/skynet-src/skynet_server.c b/skynet-src/skynet_server.c index e2baa1ce..017d7206 100644 --- a/skynet-src/skynet_server.c +++ b/skynet-src/skynet_server.c @@ -569,9 +569,6 @@ int skynet_send(struct skynet_context * context, uint32_t source, uint32_t destination , int type, int session, void * data, size_t sz) { if ((sz & HANDLE_MASK) != sz) { skynet_error(context, "The message to %x is too large (sz = %lu)", destination, sz); - if (session != 0) { - skynet_send(context, destination, source, PTYPE_ERROR, session, NULL, 0); - } skynet_free(data); return -1; }