From 4bd5344b7d86853934169d677221027f8e8c5c00 Mon Sep 17 00:00:00 2001 From: emeric Date: Sat, 17 Oct 2020 22:41:15 +0200 Subject: [PATCH] Rather use the server args for setting its thread count --- src/lms/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lms/main.cpp b/src/lms/main.cpp index 917fc7f8..11649676 100644 --- a/src/lms/main.cpp +++ b/src/lms/main.cpp @@ -76,6 +76,11 @@ generateWtConfig(std::string execPath) if (!wtAccessLogFilePath.empty()) args.push_back("--accesslog=" + wtAccessLogFilePath.string()); + { + const unsigned long httpServerThreadCount {configHttpServerThreadCount ? configHttpServerThreadCount : std::max(1, std::thread::hardware_concurrency())}; + args.push_back("--threads=" + std::to_string(httpServerThreadCount)); + } + // Generate the wt_config.xml file boost::property_tree::ptree pt; @@ -84,11 +89,6 @@ generateWtConfig(std::string execPath) pt.put("server.application-settings.log-config", Service::get()->getString("log-config", "* -debug -info:WebRequest")); pt.put("server.application-settings.behind-reverse-proxy", Service::get()->getBool("behind-reverse-proxy", false)); - { - const unsigned long httpServerThreadCount {configHttpServerThreadCount ? configHttpServerThreadCount : std::max(1, std::thread::hardware_concurrency())}; - pt.put("server.application-settings.num-threads", httpServerThreadCount); - } - { boost::property_tree::ptree viewport; viewport.put(".name", "viewport");