Commit 1bd325e276f47472eee3c8b3df472435bea4022c

Thomas de Grivel 2024-09-11T13:57:55

wip httpd

diff --git a/lib/kc3/0.1/httpd.kc3 b/lib/kc3/0.1/httpd.kc3
index b3c945b..5fc8e9c 100644
--- a/lib/kc3/0.1/httpd.kc3
+++ b/lib/kc3/0.1/httpd.kc3
@@ -56,6 +56,8 @@ defmodule HTTPd do
         end
         puts("#{res.code} #{client_addr} #{req.method} #{req.url}")
         FD.set_blocking(socket, false)
+      else
+        FD.close(socket)
       end
     end
   end
diff --git a/libkc3/file.c b/libkc3/file.c
index 3a7af28..14dcf47 100644
--- a/libkc3/file.c
+++ b/libkc3/file.c
@@ -81,6 +81,8 @@ void file_close (const s_tag *tag)
     buf_file_close(buf_rw->w);
     fclose(fp);
   }
+  else if (type == &g_sym_S32)
+    close(tag->data.s32);
   else {
     err_write_1("file_close: unknown tag type: ");
     err_inspect_sym(&type);