Loading src/event/iocp.cpp +24 −3 Changes for src/event/iocp.cpp: 24 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -227,16 +227,37 @@ namespace netplus { &pOverlapped, WSA_INFINITE); if (lpContext == 0) { if (!bReturn) { DWORD dwError = GetLastError(); if (dwError == WAIT_TIMEOUT) { if (eargs->timeout > 0) { std::this_thread::sleep_for(std::chrono::milliseconds(eargs->timeout)); } continue; } else if (dwError == ERROR_OPERATION_ABORTED) { continue; } else { NetException exp; exp[NetException::Critical] << "GetQueuedCompletionStatus failed with error: " << dwError; throw exp; } } client *pClientContext = reinterpret_cast<client*>(lpContext); if(dwBytesTransfered == 0) { if (lpContext == 0) { NetException exp; exp[NetException::Critical] << "GetQueuedCompletionStatus returned zero bytes transferred and no context!"; throw exp; } continue; } if (!bReturn && dwBytesTransfered == 0) { if (lpContext == 0) { continue; } client *pClientContext = reinterpret_cast<client*>(lpContext); pClientContext->cltmtx.lock(); try { Loading Loading
src/event/iocp.cpp +24 −3 Changes for src/event/iocp.cpp: 24 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -227,16 +227,37 @@ namespace netplus { &pOverlapped, WSA_INFINITE); if (lpContext == 0) { if (!bReturn) { DWORD dwError = GetLastError(); if (dwError == WAIT_TIMEOUT) { if (eargs->timeout > 0) { std::this_thread::sleep_for(std::chrono::milliseconds(eargs->timeout)); } continue; } else if (dwError == ERROR_OPERATION_ABORTED) { continue; } else { NetException exp; exp[NetException::Critical] << "GetQueuedCompletionStatus failed with error: " << dwError; throw exp; } } client *pClientContext = reinterpret_cast<client*>(lpContext); if(dwBytesTransfered == 0) { if (lpContext == 0) { NetException exp; exp[NetException::Critical] << "GetQueuedCompletionStatus returned zero bytes transferred and no context!"; throw exp; } continue; } if (!bReturn && dwBytesTransfered == 0) { if (lpContext == 0) { continue; } client *pClientContext = reinterpret_cast<client*>(lpContext); pClientContext->cltmtx.lock(); try { Loading