Commit 8b6e8657 authored by jan.koester's avatar jan.koester
Browse files

test

parent 848a8b2b
Loading
Loading
Loading
Loading
+3 −3
Changes for src/event/iocp.cpp: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -104,12 +104,12 @@ namespace netplus {

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

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