mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
Clear callback function in main thread
This commit is contained in:
@@ -106,6 +106,8 @@ lcallback(lua_State *L) {
|
|||||||
|
|
||||||
lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_MAINTHREAD);
|
lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_MAINTHREAD);
|
||||||
lua_State *gL = lua_tothread(L,-1);
|
lua_State *gL = lua_tothread(L,-1);
|
||||||
|
// reload callback function, See _cb()
|
||||||
|
lua_settop(gL, 0);
|
||||||
|
|
||||||
if (forward) {
|
if (forward) {
|
||||||
skynet_callback(context, gL, forward_cb);
|
skynet_callback(context, gL, forward_cb);
|
||||||
|
|||||||
Reference in New Issue
Block a user