Commit a7878a8b authored by jan.koester's avatar jan.koester
Browse files

test

parent c2fe66c2
Loading
Loading
Loading
Loading
+4 −1
Changes for src/event/iocp.cpp: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -106,12 +106,15 @@ namespace netplus {

		void RemoveFromClientList(client* pClientContext) {
			std::lock<std::mutex>(g_ClientContextMutex,pClientContext->cltmtx);
			std::lock_guard<std::mutex> lock(g_ClientContextMutex,std::adopt_lock);

			auto it = std::find(g_ClientContext.begin(), g_ClientContext.end(), pClientContext);
			if (it != g_ClientContext.end()) {
				g_ClientContext.erase(it);
				pClientContext->cltmtx.unlock();
				delete pClientContext;
			}
			g_ClientContextMutex.unlock();
			
		}

		void AcceptConnection(LPFN_ACCEPTEX lpfnAcceptEx, int tid, ULONG_PTR args) {