aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/proxy/zenproxyserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenserver/proxy/zenproxyserver.cpp')
-rw-r--r--src/zenserver/proxy/zenproxyserver.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/zenserver/proxy/zenproxyserver.cpp b/src/zenserver/proxy/zenproxyserver.cpp
index 7e59a7b7e..ffa9a4295 100644
--- a/src/zenserver/proxy/zenproxyserver.cpp
+++ b/src/zenserver/proxy/zenproxyserver.cpp
@@ -257,7 +257,7 @@ ZenProxyServerConfigurator::ValidateOptions()
for (const std::string& Raw : m_RawProxyMappings)
{
// The mode keyword "proxy" from argv[1] gets captured as a positional
- // argument — skip it.
+ // argument - skip it.
if (Raw == "proxy")
{
continue;
@@ -304,7 +304,7 @@ ZenProxyServer::Initialize(const ZenProxyServerConfig& ServerConfig, ZenServerSt
// worker threads don't exit prematurely between async operations.
m_ProxyIoWorkGuard.emplace(m_ProxyIoContext.get_executor());
- // Start proxy I/O worker threads. Use a modest thread count — proxy work is
+ // Start proxy I/O worker threads. Use a modest thread count - proxy work is
// I/O-bound so we don't need a thread per core, but having more than one
// avoids head-of-line blocking when many connections are active.
unsigned int ThreadCount = std::max(GetHardwareConcurrency() / 4, 4u);
@@ -385,6 +385,8 @@ ZenProxyServer::Run()
OnReady();
+ StartSelfSession("zenproxy");
+
m_Http->Run(IsInteractiveMode);
SetNewState(kShuttingDown);
@@ -422,15 +424,16 @@ ZenProxyServer::Cleanup()
m_IoRunner.join();
}
- m_ProxyStatsService.reset();
- m_FrontendService.reset();
- m_ApiService.reset();
-
- ShutdownServices();
if (m_Http)
{
m_Http->Close();
}
+
+ ShutdownServices();
+
+ m_ProxyStatsService.reset();
+ m_FrontendService.reset();
+ m_ApiService.reset();
}
catch (const std::exception& Ex)
{