Commit 2bb35f03 authored by jan.koester's avatar jan.koester
Browse files

test

parent 7c8d7497
Loading
Loading
Loading
Loading
+11 −2
Changes for src/event/epoll.cpp: 11 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -217,7 +217,7 @@ namespace netplus {
                return;
            }

            std::unique_lock<std::mutex> lock(rcon->event_mutex, std::defer_lock);
            std::lock_guard<std::mutex> lock_guard(rcon->event_mutex);

            if (!rcon->csock) { return; }

@@ -252,7 +252,11 @@ namespace netplus {
        void WriteEventHandler(int pos,const int tid,ULONG_PTR args) {
            con *wcon = reinterpret_cast<con*>(_Events[pos].data.ptr);

            std::unique_lock<std::mutex> lock(wcon->event_mutex, std::defer_lock);
            if(!wcon ||  !wcon->csock){
                    return;
            }

            std::lock_guard<std::mutex> lock_guard(wcon->event_mutex);

            if (!wcon->csock) { return; }

@@ -415,6 +419,11 @@ void CloseEventHandler(int pos,const int tid,ULONG_PTR args) {
                    std::cerr << e.what() << std::endl;
                }
            }
            //secure all sockets closed
            for (int i = 0; i <eargs->ssocket->getMaxconnections();  ++i){
                pollptr.CloseEventHandler(i,tid,args);
            }

        }
    };