From f7be40ddd5fdd5263384d2f5f751ea2a68a773c5 Mon Sep 17 00:00:00 2001 From: Zhang Jingqiang Date: Tue, 2 Jan 2024 17:48:57 +0800 Subject: [PATCH] g3tiles: get the correct worker number --- g3tiles/src/serve/openssl_proxy/host.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/g3tiles/src/serve/openssl_proxy/host.rs b/g3tiles/src/serve/openssl_proxy/host.rs index 73b7da10..7a5eb2e0 100644 --- a/g3tiles/src/serve/openssl_proxy/host.rs +++ b/g3tiles/src/serve/openssl_proxy/host.rs @@ -286,7 +286,7 @@ impl OpensslHost { } fn set_ssl_context(&mut self) -> anyhow::Result<()> { - let ctx_count = g3_daemon::runtime::worker::worker_count().min(1); + let ctx_count = g3_daemon::runtime::worker::worker_count().max(1); let mut ssl_context = Vec::with_capacity(ctx_count); for _ in 0..ctx_count { if let Some(ctx) = self.config.build_ssl_context(&self.session_cache)? { @@ -308,7 +308,7 @@ impl OpensslHost { #[cfg(feature = "vendored-tongsuo")] fn set_tlcp_context(&mut self) -> anyhow::Result<()> { - let ctx_count = g3_daemon::runtime::worker::worker_count().min(1); + let ctx_count = g3_daemon::runtime::worker::worker_count().max(1); let mut tlcp_context = Vec::with_capacity(ctx_count); for _ in 0..ctx_count { if let Some(ctx) = self.config.build_tlcp_context(&self.session_cache)? {