diff options
| author | Dan Engelbrecht <[email protected]> | 2026-02-12 10:58:41 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-02-12 10:58:41 +0100 |
| commit | c37421a3b4493c0b0f9afef15a4ea7b74d152067 (patch) | |
| tree | b1d95430ed3518490304a6a128aee4e2aeed84d3 /src/zenhttp/servers/httpmulti.cpp | |
| parent | reduce lock time for project store gc precache and gc validate (#750) (diff) | |
| download | zen-c37421a3b4493c0b0f9afef15a4ea7b74d152067.tar.xz zen-c37421a3b4493c0b0f9afef15a4ea7b74d152067.zip | |
add simple http client tests (#751)
* add simple http client tests and fix run loop of http server to not rely on application quit
Diffstat (limited to 'src/zenhttp/servers/httpmulti.cpp')
| -rw-r--r-- | src/zenhttp/servers/httpmulti.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/zenhttp/servers/httpmulti.cpp b/src/zenhttp/servers/httpmulti.cpp index 31cb04be5..95624245f 100644 --- a/src/zenhttp/servers/httpmulti.cpp +++ b/src/zenhttp/servers/httpmulti.cpp @@ -56,7 +56,8 @@ HttpMultiServer::OnInitialize(int BasePort, std::filesystem::path DataDir) void HttpMultiServer::OnRun(bool IsInteractiveSession) { - const int WaitTimeout = 1000; + const int WaitTimeout = 1000; + bool ShutdownRequested = false; #if ZEN_PLATFORM_WINDOWS if (IsInteractiveSession) @@ -76,8 +77,8 @@ HttpMultiServer::OnRun(bool IsInteractiveSession) } } - m_ShutdownEvent.Wait(WaitTimeout); - } while (!IsApplicationExitRequested()); + ShutdownRequested = m_ShutdownEvent.Wait(WaitTimeout); + } while (!ShutdownRequested); #else if (IsInteractiveSession) { @@ -86,8 +87,8 @@ HttpMultiServer::OnRun(bool IsInteractiveSession) do { - m_ShutdownEvent.Wait(WaitTimeout); - } while (!IsApplicationExitRequested()); + ShutdownRequested = m_ShutdownEvent.Wait(WaitTimeout); + } while (!ShutdownRequested); #endif } |