diff options
| author | Dan Engelbrecht <[email protected]> | 2023-02-21 14:12:20 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-21 05:12:20 -0800 |
| commit | f26a423e8625e378c6fec0697bdd93db85651609 (patch) | |
| tree | eea787c89a125687567f1534c5f1448e6a9b4dd9 /zenhttp/httpsys.cpp | |
| parent | UE 177395 - fix crash when using asio http server and requesting info on non-... (diff) | |
| download | zen-f26a423e8625e378c6fec0697bdd93db85651609.tar.xz zen-f26a423e8625e378c6fec0697bdd93db85651609.zip | |
Fix httpsys async response (#237)
* Fix HttpSysServerRequest::WriteResponseAsync to use async path base on IsAsyncResponseEnabled() flag
* changelog
Diffstat (limited to 'zenhttp/httpsys.cpp')
| -rw-r--r-- | zenhttp/httpsys.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<void(HttpServerRequest&)> { 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()); } } |