mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 03:53:09 +00:00
don't throw error when destination address is invalid
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user