Loading src/event/kqueue.cpp +6 −5 Changes for src/event/kqueue.cpp: 6 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -198,10 +198,11 @@ namespace netplus { ccon->lasteventime = time(nullptr); struct kevent setevent {}; setevent.udata = ccon.get(); setevent.udata = ccon.release(); con *sccon=setevent.udata; EV_SET(&setevent, ccon->csock->fd(), EVFILT_READ, EV_ADD | EV_ONESHOT,0,0,ccon.get()); EV_SET(&setevent, ccon->csock->fd(), EVFILT_READ, EV_ADD | EV_ONESHOT,0,0,sccon); int estate = kevent(_pollFD, &setevent, 1, nullptr, 0, nullptr); Loading @@ -212,10 +213,10 @@ namespace netplus { throw exception; } evconnection ->ConnectEvent(*ccon,tid,args); evconnection ->ConnectEvent(sccon,tid,args); { std::lock_guard<std::mutex> clock(ccon->event_mutex),global_lock(POLL_HANDLER_MUTEX); CONNECTIONS.emplace(ccon->csock->fd(),ccon.release()); std::lock_guard<std::mutex> clock(sccon->event_mutex),global_lock(POLL_HANDLER_MUTEX); CONNECTIONS.emplace(sccon->csock->fd(),sccon); } }; Loading Loading
src/event/kqueue.cpp +6 −5 Changes for src/event/kqueue.cpp: 6 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -198,10 +198,11 @@ namespace netplus { ccon->lasteventime = time(nullptr); struct kevent setevent {}; setevent.udata = ccon.get(); setevent.udata = ccon.release(); con *sccon=setevent.udata; EV_SET(&setevent, ccon->csock->fd(), EVFILT_READ, EV_ADD | EV_ONESHOT,0,0,ccon.get()); EV_SET(&setevent, ccon->csock->fd(), EVFILT_READ, EV_ADD | EV_ONESHOT,0,0,sccon); int estate = kevent(_pollFD, &setevent, 1, nullptr, 0, nullptr); Loading @@ -212,10 +213,10 @@ namespace netplus { throw exception; } evconnection ->ConnectEvent(*ccon,tid,args); evconnection ->ConnectEvent(sccon,tid,args); { std::lock_guard<std::mutex> clock(ccon->event_mutex),global_lock(POLL_HANDLER_MUTEX); CONNECTIONS.emplace(ccon->csock->fd(),ccon.release()); std::lock_guard<std::mutex> clock(sccon->event_mutex),global_lock(POLL_HANDLER_MUTEX); CONNECTIONS.emplace(sccon->csock->fd(),sccon); } }; Loading