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 | |
| 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
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | zenhttp/httpsys.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index db04c7290..ec2b541b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - `--stride` The stride to use when selecting requests to playback - `--onhost` Replay the recording inside the zenserver bypassing http overhead - `--showmethodstats` Show statistics of which RPC methods are used +- Bugfix: Make sure async responses are sent async correctly in httpsys - Improvement: FileCas now keeps an up to date index of all the entries improving performance when getting cache misses on large payloads - Changed: Exit with failure code on port conflict rather than reporting crash to Sentry 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()); } } |