diff options
Diffstat (limited to 'zenhttp/httpsys.cpp')
| -rw-r--r-- | zenhttp/httpsys.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/zenhttp/httpsys.cpp b/zenhttp/httpsys.cpp index 3c5e5d8d3..7ce970d15 100644 --- a/zenhttp/httpsys.cpp +++ b/zenhttp/httpsys.cpp @@ -415,7 +415,7 @@ HttpMessageResponseRequest::HandleCompletion(ULONG IoResult, ULONG_PTR NumberOfB { ZEN_UNUSED(NumberOfBytesTransferred); - if (IoResult) + if (IoResult != NO_ERROR) { ZEN_WARN("response aborted due to error: '{}'", GetWindowsErrorAsString(IoResult)); @@ -898,9 +898,7 @@ HttpSysTransaction::HandleCompletion(ULONG IoResult, ULONG_PTR NumberOfBytesTran if (HttpSysRequestHandler* CurrentHandler = m_CompletionHandler) { - const bool IsInitialRequest = (CurrentHandler == &m_InitialHttpHandler) && m_InitialHttpHandler.IsInitialRequest(); - - if (IsInitialRequest) + if ((CurrentHandler == &m_InitialHttpHandler) && m_InitialHttpHandler.IsInitialRequest()) { // Ensure we have a sufficient number of pending requests outstanding m_HttpServer.OnHandlingRequest(); @@ -933,7 +931,7 @@ HttpSysTransaction::HandleCompletion(ULONG IoResult, ULONG_PTR NumberOfBytesTran } else { - if (IsInitialRequest == false) + if (CurrentHandler != &m_InitialHttpHandler) { delete CurrentHandler; } @@ -1254,11 +1252,12 @@ InitialRequestHandler::HandleCompletion(ULONG IoResult, ULONG_PTR NumberOfBytesT switch (IoResult) { + default: case ERROR_OPERATION_ABORTED: return nullptr; - case ERROR_MORE_DATA: - // Insufficient buffer space + case ERROR_MORE_DATA: // Insufficient buffer space + case NO_ERROR: break; } |