Loading src/event/epoll.cpp +11 −2 Changes for src/event/epoll.cpp: 11 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -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; } Loading Loading @@ -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; } Loading Loading @@ -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); } } }; Loading Loading
src/event/epoll.cpp +11 −2 Changes for src/event/epoll.cpp: 11 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -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; } Loading Loading @@ -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; } Loading Loading @@ -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); } } }; Loading