summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2022-12-09 18:56:48 +0200
committerGitHub <noreply@github.com>2022-12-09 18:56:48 +0200
commitc728bfc1eb00a662a24010d2b33e287d44d2a09b (patch)
tree8c2064f3d5955d9456943c78c3de4a8c9f767c44 /web
parent32d63fe9a6a18c9e757499f0e23a1169b516f9bf (diff)
fix get_system_cpus() (#14116)
Diffstat (limited to 'web')
-rw-r--r--web/server/static/static-threaded.c2
1 files changed, 1 insertions, 1 deletions
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");