mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
bugfix
This commit is contained in:
@@ -74,7 +74,7 @@ lpackrequest(lua_State *L) {
|
||||
return luaL_error(L, "Invalid request message");
|
||||
}
|
||||
size_t sz = (size_t)luaL_checkinteger(L,4);
|
||||
int session = luaL_optinteger(L,2,1); // new connection start with 1
|
||||
int session = luaL_checkinteger(L,2);
|
||||
if (session <= 0) {
|
||||
skynet_free(msg);
|
||||
return luaL_error(L, "Invalid request session %d", session);
|
||||
|
||||
@@ -62,7 +62,7 @@ function command.listen(source, addr, port)
|
||||
end
|
||||
|
||||
local function send_request(source, node, addr, msg, sz)
|
||||
local session = node_session[node]
|
||||
local session = node_session[node] or 1
|
||||
-- msg is a local pointer, cluster.packrequest will free it
|
||||
local request, new_session = cluster.packrequest(addr, session, msg, sz)
|
||||
local c = node_channel[node]
|
||||
|
||||
Reference in New Issue
Block a user