Loading src/event/iocp.cpp +4 −1 Changes for src/event/iocp.cpp: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -111,15 +111,18 @@ namespace netplus { void RemoveFromClientList(client* pClientContext) { std::lock(g_ClientContextMutex, pClientContext->cltmtx); std::lock_guard<std::mutex> lock(g_ClientContextMutex, std::adopt_lock); std::lock_guard<std::mutex> lock2(pClientContext->cltmtx, std::adopt_lock); //Remove the client context from the list auto it = std::find(g_ClientContext.begin(), g_ClientContext.end(), pClientContext); if (it != g_ClientContext.end()) { g_ClientContext.erase(it); pClientContext->cltmtx.unlock(); // Clean up the client context delete pClientContext; pClientContext = nullptr; } } void AcceptConnection(LPFN_ACCEPTEX lpfnAcceptEx, int tid, ULONG_PTR args) { Loading Loading
src/event/iocp.cpp +4 −1 Changes for src/event/iocp.cpp: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -111,15 +111,18 @@ namespace netplus { void RemoveFromClientList(client* pClientContext) { std::lock(g_ClientContextMutex, pClientContext->cltmtx); std::lock_guard<std::mutex> lock(g_ClientContextMutex, std::adopt_lock); std::lock_guard<std::mutex> lock2(pClientContext->cltmtx, std::adopt_lock); //Remove the client context from the list auto it = std::find(g_ClientContext.begin(), g_ClientContext.end(), pClientContext); if (it != g_ClientContext.end()) { g_ClientContext.erase(it); pClientContext->cltmtx.unlock(); // Clean up the client context delete pClientContext; pClientContext = nullptr; } } void AcceptConnection(LPFN_ACCEPTEX lpfnAcceptEx, int tid, ULONG_PTR args) { Loading