Commit 959ea54edc2fa844faaac024a468c10481b8c74b

Thomas de Grivel 2024-12-08T09:30:34

Fix threads in httpd

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/lib/kc3/0.1/httpd.kc3 b/lib/kc3/0.1/httpd.kc3
index c7391f8..1c38490 100644
--- a/lib/kc3/0.1/httpd.kc3
+++ b/lib/kc3/0.1/httpd.kc3
@@ -127,8 +127,8 @@ defmodule HTTPd do
       daemonize()
       puts("KC3 HTTPd: listening on #{host}:#{port}")
       load_app()
-      if thread_count > 1 do
-        threads = List.map(List.count(thread_count - 1), fn (x) {
+      if HTTPd.thread_count > 1 do
+        threads = List.map(List.count(HTTPd.thread_count - 1), fn (x) {
           Thread.new(HTTPd.server_thread)
         })
         HTTPd.server_thread()