From c728bfc1eb00a662a24010d2b33e287d44d2a09b Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Fri, 9 Dec 2022 18:56:48 +0200 Subject: fix get_system_cpus() (#14116) --- web/server/static/static-threaded.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web') diff --git a/web/server/static/static-threaded.c b/web/server/static/static-threaded.c index 26e9a47bda..f4f6a11cfe 100644 --- a/web/server/static/static-threaded.c +++ b/web/server/static/static-threaded.c @@ -502,7 +502,7 @@ void *socket_listen_main_static_threaded(void *ptr) { // 6 threads is the optimal value // since 6 are the parallel connections browsers will do // so, if the machine has more CPUs, avoid using resources unnecessarily - int def_thread_count = (processors > 6) ? 6 : processors; + int def_thread_count = (get_system_cpus() > 6) ? 6 : (int)get_system_cpus(); if (!strcmp(config_get(CONFIG_SECTION_WEB, "mode", ""),"single-threaded")) { info("Running web server with one thread, because mode is single-threaded"); -- cgit v1.2.3