Commit 3788abb1 authored by jan.koester's avatar jan.koester
Browse files

test

parent 7d1aba2f
Loading
Loading
Loading
Loading
+6 −1
Changes for src/event/iocp.cpp: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ namespace netplus {
		HANDLE             State;
		eventapi*          api;
		con*               CurCon;
		mutable std::mutex cltmtx;
	};

	class poll {
@@ -245,6 +246,9 @@ namespace netplus {
					continue;
				}

				if (!pClientContext->cltmtx.try_lock()) {
					continue;
				}
				try {
					auto& curCon = pClientContext->CurCon;
					if (!curCon->SendData.empty()) {
@@ -267,9 +271,10 @@ namespace netplus {
					if(e.getErrorType()!=NetException::Note){
						closesocket(pClientContext->CurCon->csock->fd());
						eargs->evpoll->RemoveFromClientList(pClientContext);
					}
						continue;
					}
				}
				pClientContext->cltmtx.unlock();
			} // for
		}
	};