Loading src/event/iocp.cpp +9 −6 Changes for src/event/iocp.cpp: 9 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -232,10 +232,10 @@ namespace netplus { } else if (dwError == ERROR_OPERATION_ABORTED) { continue; } else { NetException exp; exp[NetException::Critical] << "GetQueuedCompletionStatus failed with error: " << dwError; throw exp; //NetException exp; //exp[NetException::Critical] << "GetQueuedCompletionStatus failed with error: " << dwError; //throw exp; continue; } } Loading @@ -245,12 +245,12 @@ namespace netplus { client *pClientContext = reinterpret_cast<client*>(lpContext); std::unique_lock<std::mutex> clock(pClientContext->cltmtx); try { con *curCon = pClientContext->CurCon; switch (pClientContext->State) { case IO_WRITE_STATE: { std::unique_lock<std::mutex> clock(pClientContext->cltmtx); eargs->event->ResponseEvent(*curCon, tid, args); ULONG ssize = curCon->SendData.size() < BLOCKSIZE ? (ULONG)curCon->SendData.size() : BLOCKSIZE; Loading @@ -269,6 +269,7 @@ namespace netplus { } }break; case IO_READ_STATE: { std::unique_lock<std::mutex> clock(pClientContext->cltmtx); buffer buf(BLOCKSIZE); Loading @@ -295,10 +296,12 @@ namespace netplus { } catch (NetException& e) { std::cerr << e.what() << std::endl; eargs->event->DisconnectEvent(*pClientContext->CurCon, tid, args); WSACloseEvent(pClientContext->CurCon->csock->_Overlapped.hEvent); delete pClientContext->CurCon->csock; delete pClientContext; } catch (...) { eargs->event->DisconnectEvent(*pClientContext->CurCon, tid, args); WSACloseEvent(pClientContext->CurCon->csock->_Overlapped.hEvent); delete pClientContext->CurCon->csock; delete pClientContext; } Loading Loading
src/event/iocp.cpp +9 −6 Changes for src/event/iocp.cpp: 9 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -232,10 +232,10 @@ namespace netplus { } else if (dwError == ERROR_OPERATION_ABORTED) { continue; } else { NetException exp; exp[NetException::Critical] << "GetQueuedCompletionStatus failed with error: " << dwError; throw exp; //NetException exp; //exp[NetException::Critical] << "GetQueuedCompletionStatus failed with error: " << dwError; //throw exp; continue; } } Loading @@ -245,12 +245,12 @@ namespace netplus { client *pClientContext = reinterpret_cast<client*>(lpContext); std::unique_lock<std::mutex> clock(pClientContext->cltmtx); try { con *curCon = pClientContext->CurCon; switch (pClientContext->State) { case IO_WRITE_STATE: { std::unique_lock<std::mutex> clock(pClientContext->cltmtx); eargs->event->ResponseEvent(*curCon, tid, args); ULONG ssize = curCon->SendData.size() < BLOCKSIZE ? (ULONG)curCon->SendData.size() : BLOCKSIZE; Loading @@ -269,6 +269,7 @@ namespace netplus { } }break; case IO_READ_STATE: { std::unique_lock<std::mutex> clock(pClientContext->cltmtx); buffer buf(BLOCKSIZE); Loading @@ -295,10 +296,12 @@ namespace netplus { } catch (NetException& e) { std::cerr << e.what() << std::endl; eargs->event->DisconnectEvent(*pClientContext->CurCon, tid, args); WSACloseEvent(pClientContext->CurCon->csock->_Overlapped.hEvent); delete pClientContext->CurCon->csock; delete pClientContext; } catch (...) { eargs->event->DisconnectEvent(*pClientContext->CurCon, tid, args); WSACloseEvent(pClientContext->CurCon->csock->_Overlapped.hEvent); delete pClientContext->CurCon->csock; delete pClientContext; } Loading