IronsDu/Joynet

你好!brynet更新了,但是这个工程没更新了。

black0592 opened this issue · 6 comments

有一些lua功能的函数都对应不上了,
比如:joynet.cpp(172) “postDisConnect”: 不是“brynet::net::TcpService”的成员,
不知道作者什么时候能更新一下。^-^

@black0592 嗯,抱歉,请问你们在用这个库么?我前段时间调整了brynet,但忘记来更新这个库了。
晚上我抽点时间来更新吧。

@black0592 麻烦你更新下最新的Joynet,我已经针对最新的brynet进行更新了。

    auto timer = mTimerMgr->addTimer(std::chrono::milliseconds(delayMs), [=](){

        mTimerList.erase(id);

        lua_State *__L = callback.L;
        if (__L == nullptr)
        {
            __L = L;
        }//如果这里__L是null 那么 callback.L也肯定是null,那么这里调用 lua_tinker::releaseLuaValueRef(callback);就出错了因为luastatus肯定也是null

        int __oldtop = lua_gettop(__L); 
        lua_pushcclosure(__L, lua_tinker::on_error, 0);
        int errfunc = lua_gettop(__L);
        lua_rawgeti(__L, LUA_REGISTRYINDEX, callback.rindex);
        if (lua_isfunction(__L, -1))
        {
            lua_pcall(__L, 0, 0, errfunc);
        }
        lua_remove(__L, errfunc);

        lua_settop(__L,__oldtop);
        lua_tinker::releaseLuaValueRef(callback);
    });

你测试出来出错了么?

你测试出来出错了么?

是啊,运行时会出错

@black0592 加我QQ说吧,790390398