Commit 72a98630 authored by jan.koester's avatar jan.koester
Browse files

stupid

parent 27b2a7a2
Loading
Loading
Loading
Loading
+6 −4
Changes for src/event/iocp.cpp: 6 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ namespace netplus {
				}

				try {
					std::unique_lock<std::mutex> cltLock(pClientContext->cltmtx);
					std::lock_guard<std::mutex> cltLock(pClientContext->cltmtx);

					auto& curCon = pClientContext->CurCon;					
					
@@ -263,10 +263,11 @@ namespace netplus {
							
							eargs->event->ResponseEvent(curCon, tid, args);

							ULONG ssize = curCon->SendData.size() < BLOCKSIZE ? (ULONG)curCon->SendData.size() : BLOCKSIZE;
							DWORD ret = 0;
							ret = curCon->csock->sendData(curCon->SendData.data(), ssize, 0);
							size_t ssize = curCon->SendData.size() < BLOCKSIZE ? curCon->SendData.size() : BLOCKSIZE;
							size_t ret = curCon->csock->sendData(curCon->SendData.data(), ssize, 0);
							
							curCon->SendData.resize(ret);
							
							if (curCon->SendData.empty())
								pClientContext->State = IO_READ_STATE;
						}break;
@@ -288,6 +289,7 @@ namespace netplus {
				} catch (NetException& e) {
					std::cerr << e.what() << std::endl;
					if (e.getErrorType() == NetException::Note) {
						WSAResetEvent(pClientContext->CurCon->csock->_Overlapped.hEvent);
						continue;
					}
					eargs->evpoll->RemoveFromClientList(pClientContext);