mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
drop invalid session id in trace
This commit is contained in:
@@ -369,8 +369,10 @@ _trace_delete(lua_State *L) {
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
_trace_switch(lua_State *L) {
|
_trace_switch(lua_State *L) {
|
||||||
struct trace_pool *p = lua_touserdata(L,1);
|
|
||||||
int session = luaL_checkinteger(L,2);
|
int session = luaL_checkinteger(L,2);
|
||||||
|
if (session <=0)
|
||||||
|
return 0;
|
||||||
|
struct trace_pool *p = lua_touserdata(L,1);
|
||||||
trace_switch(p, session);
|
trace_switch(p, session);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -388,8 +390,10 @@ _trace_yield(lua_State *L) {
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
_trace_register(lua_State *L) {
|
_trace_register(lua_State *L) {
|
||||||
struct trace_pool *p = lua_touserdata(L,1);
|
|
||||||
int session = luaL_checkinteger(L,2);
|
int session = luaL_checkinteger(L,2);
|
||||||
|
if (session <=0)
|
||||||
|
return 0;
|
||||||
|
struct trace_pool *p = lua_touserdata(L,1);
|
||||||
trace_register(p, session);
|
trace_register(p, session);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user