mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
fix issue #773
This commit is contained in:
@@ -177,14 +177,14 @@ packrequest(lua_State *L, int is_push) {
|
|||||||
} else {
|
} else {
|
||||||
multipak = packreq_string(L, session, msg, sz, is_push);
|
multipak = packreq_string(L, session, msg, sz, is_push);
|
||||||
}
|
}
|
||||||
int current_session = session;
|
uint32_t new_session = (uint32_t)session + 1;
|
||||||
if (++session < 0) {
|
if (new_session > INT32_MAX) {
|
||||||
session = 1;
|
new_session = 1;
|
||||||
}
|
}
|
||||||
lua_pushinteger(L, session);
|
lua_pushinteger(L, new_session);
|
||||||
if (multipak) {
|
if (multipak) {
|
||||||
lua_createtable(L, multipak, 0);
|
lua_createtable(L, multipak, 0);
|
||||||
packreq_multi(L, current_session, msg, sz);
|
packreq_multi(L, session, msg, sz);
|
||||||
skynet_free(msg);
|
skynet_free(msg);
|
||||||
return 3;
|
return 3;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user