remove dead_service table, address may reused

This commit is contained in:
Cloud Wu
2018-10-08 15:44:12 +08:00
parent 98b5c7c7c6
commit 7e57e498f6
3 changed files with 38 additions and 58 deletions

View File

@@ -278,6 +278,11 @@ send_message(lua_State *L, int source, int idx_type) {
luaL_error(L, "invalid param %s", lua_typename(L, lua_type(L,idx_type+2)));
}
if (session < 0) {
if (session == -2) {
// package is too large
lua_pushboolean(L, 0);
return 1;
}
// send to invalid address
// todo: maybe throw an error would be better
return 0;