aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/servers/httpasio.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/httpasio.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/httpasio.cpp')
-rw-r--r--src/zenhttp/servers/httpasio.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/zenhttp/servers/httpasio.cpp b/src/zenhttp/servers/httpasio.cpp
index 18a0f6a40..76fea65b3 100644
--- a/src/zenhttp/servers/httpasio.cpp
+++ b/src/zenhttp/servers/httpasio.cpp
@@ -97,7 +97,11 @@ IsIPv6AvailableSysctl(void)
return val == 0;
}
+#endif // ZEN_PLATFORM_LINUX
+namespace zen {
+
+#if ZEN_PLATFORM_LINUX
bool
IsIPv6Capable()
{
@@ -121,8 +125,6 @@ IsIPv6Capable()
}
#endif
-namespace zen {
-
const FLLMTag&
GetHttpasioTag()
{
@@ -1992,7 +1994,8 @@ HttpAsioServer::OnInitialize(int BasePort, std::filesystem::path DataDir)
void
HttpAsioServer::OnRun(bool IsInteractive)
{
- const int WaitTimeout = 1000;
+ const int WaitTimeout = 1000;
+ bool ShutdownRequested = false;
#if ZEN_PLATFORM_WINDOWS
if (IsInteractive)
@@ -2012,8 +2015,8 @@ HttpAsioServer::OnRun(bool IsInteractive)
}
}
- m_ShutdownEvent.Wait(WaitTimeout);
- } while (!IsApplicationExitRequested());
+ ShutdownRequested = m_ShutdownEvent.Wait(WaitTimeout);
+ } while (!ShutdownRequested);
#else
if (IsInteractive)
{
@@ -2022,8 +2025,8 @@ HttpAsioServer::OnRun(bool IsInteractive)
do
{
- m_ShutdownEvent.Wait(WaitTimeout);
- } while (!IsApplicationExitRequested());
+ ShutdownRequested = m_ShutdownEvent.Wait(WaitTimeout);
+ } while (!ShutdownRequested);
#endif
}