Commit 7ef202ce authored by jan.koester's avatar jan.koester
Browse files

fxied

parent 459aaf29
Loading
Loading
Loading
Loading
+2 −3
Changes for src/event/kqueue.cpp: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -179,8 +179,6 @@ namespace netplus {
        };

        void ConnectEventHandler(int pos,const int tid,ULONG_PTR args)  {
            std::lock_guard<std::mutex> global_lock(POLL_HANDLER_MUTEX);

            NetException exception;

            std::unique_ptr<con> ccon;
@@ -208,7 +206,8 @@ namespace netplus {
            struct kevent setevent {};
            setevent.udata = ccon.get();
            {
                std::lock_guard<std::mutex> lock_guard(ccon->event_mutex);
                std::lock_guard<std::mutex> clock(ccon->event_mutex),global_lock(POLL_HANDLER_MUTEX);

                EV_SET(&setevent, ccon->csock->fd(), EVFILT_READ, EV_ADD | EV_ONESHOT,0,0,ccon.get());

                int estate = kevent(_pollFD, &setevent, 1, nullptr, 0, nullptr);