From f26a423e8625e378c6fec0697bdd93db85651609 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Tue, 21 Feb 2023 14:12:20 +0100 Subject: Fix httpsys async response (#237) * Fix HttpSysServerRequest::WriteResponseAsync to use async path base on IsAsyncResponseEnabled() flag * changelog --- zenhttp/httpsys.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zenhttp/httpsys.cpp') diff --git a/zenhttp/httpsys.cpp b/zenhttp/httpsys.cpp index 926e6b09f..f6f8024ca 100644 --- a/zenhttp/httpsys.cpp +++ b/zenhttp/httpsys.cpp @@ -1400,11 +1400,11 @@ HttpSysServerRequest::WriteResponseAsync(std::function { if (m_HttpTx.Server().IsAsyncResponseEnabled()) { - ContinuationHandler(m_HttpTx.ServerRequest()); + m_NextCompletionHandler = new HttpAsyncWorkRequest(m_HttpTx, std::move(ContinuationHandler)); } else { - m_NextCompletionHandler = new HttpAsyncWorkRequest(m_HttpTx, std::move(ContinuationHandler)); + ContinuationHandler(m_HttpTx.ServerRequest()); } } -- cgit v1.2.3