ldcsaa / HP-Socket

High Performance TCP/UDP/HTTP Communication Component

Home Page:https://www.oschina.net/p/hp-socket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid request code 然后程序崩溃

kisstea opened this issue · comments

错误如下:

(#332145, 2157269344) > exit(70) [56] : Invalid request code
HPSocket/socket/../common/Event.h (272) : CCounterEvent<is_sem_mode>::CCounterEvent(int) [with bool is_sem_mode = false]

    CCounterEvent(int iInitCount = 0)
    {
            int iFlag       = EFD_NONBLOCK | EFD_CLOEXEC | (is_sem_mode ? EFD_SEMAPHORE : 0);
            m_evt           = eventfd(iInitCount, iFlag);

            VERIFY(IsValid()); // 这一句
    }

我现在参考其他issue先尝试去掉 VERIFY

你看看eventfd调用的errno是什么。然后查看这个函数的API文档