aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/proxy/zenproxyserver.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-03-12 17:02:01 +0100
committerGitHub Enterprise <[email protected]>2026-03-12 17:02:01 +0100
commit3aa6aa83d05249d7081a8c19a28ce9b9c4566da2 (patch)
treef4f14006e82cdf0ed05083c9af90e17116614368 /src/zenserver/proxy/zenproxyserver.cpp
parentUpdate CHANGELOG.md (diff)
downloadzen-3aa6aa83d05249d7081a8c19a28ce9b9c4566da2.tar.xz
zen-3aa6aa83d05249d7081a8c19a28ce9b9c4566da2.zip
Add --no-network option (#831)
- Add `--no-network` CLI option which disables all TCP/HTTPS listeners, restricting zenserver to Unix domain socket communication only. - Also fixes asio upgrade breakage on main
Diffstat (limited to 'src/zenserver/proxy/zenproxyserver.cpp')
-rw-r--r--src/zenserver/proxy/zenproxyserver.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zenserver/proxy/zenproxyserver.cpp b/src/zenserver/proxy/zenproxyserver.cpp
index 1fd9cd2c4..acfdad45f 100644
--- a/src/zenserver/proxy/zenproxyserver.cpp
+++ b/src/zenserver/proxy/zenproxyserver.cpp
@@ -302,7 +302,7 @@ ZenProxyServer::Initialize(const ZenProxyServerConfig& ServerConfig, ZenServerSt
// Keep the io_context alive even when there is no pending work, so that
// worker threads don't exit prematurely between async operations.
- m_ProxyIoWorkGuard = std::make_unique<asio::io_context::work>(m_ProxyIoContext);
+ m_ProxyIoWorkGuard.emplace(m_ProxyIoContext.get_executor());
// 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
@@ -404,7 +404,7 @@ ZenProxyServer::Cleanup()
Service->Stop();
}
- m_ProxyIoWorkGuard.reset();
+ m_ProxyIoWorkGuard.reset(); // releases the work guard, allowing io_context to finish
m_ProxyIoContext.stop();
for (auto& Thread : m_ProxyIoThreads)
{