aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/servers/httpnull.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2026-02-12 10:58:41 +0100
committerGitHub Enterprise <[email protected]>2026-02-12 10:58:41 +0100
commitc37421a3b4493c0b0f9afef15a4ea7b74d152067 (patch)
treeb1d95430ed3518490304a6a128aee4e2aeed84d3 /src/zenhttp/servers/httpnull.cpp
parentreduce lock time for project store gc precache and gc validate (#750) (diff)
downloadzen-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/httpnull.cpp')
-rw-r--r--src/zenhttp/servers/httpnull.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/zenhttp/servers/httpnull.cpp b/src/zenhttp/servers/httpnull.cpp
index 0ec1cb3c4..b770b97db 100644
--- a/src/zenhttp/servers/httpnull.cpp
+++ b/src/zenhttp/servers/httpnull.cpp
@@ -34,7 +34,8 @@ HttpNullServer::OnInitialize(int BasePort, std::filesystem::path DataDir)
void
HttpNullServer::OnRun(bool IsInteractiveSession)
{
- const int WaitTimeout = 1000;
+ const int WaitTimeout = 1000;
+ bool ShutdownRequested = false;
#if ZEN_PLATFORM_WINDOWS
if (IsInteractiveSession)
@@ -54,8 +55,8 @@ HttpNullServer::OnRun(bool IsInteractiveSession)
}
}
- m_ShutdownEvent.Wait(WaitTimeout);
- } while (!IsApplicationExitRequested());
+ ShutdownRequested = m_ShutdownEvent.Wait(WaitTimeout);
+ } while (!ShutdownRequested);
#else
if (IsInteractiveSession)
{
@@ -64,8 +65,8 @@ HttpNullServer::OnRun(bool IsInteractiveSession)
do
{
- m_ShutdownEvent.Wait(WaitTimeout);
- } while (!IsApplicationExitRequested());
+ ShutdownRequested = m_ShutdownEvent.Wait(WaitTimeout);
+ } while (!ShutdownRequested);
#endif
}