From 60dc366bd26a0720aa21a3daebeb652032f11063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lavergne?= Date: Mon, 7 Aug 2023 10:49:04 -0400 Subject: [PATCH] Stop listening after accept loop --- src/Tiny_httpd_server.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Tiny_httpd_server.ml b/src/Tiny_httpd_server.ml index 26624d4b..227b92f6 100644 --- a/src/Tiny_httpd_server.ml +++ b/src/Tiny_httpd_server.ml @@ -973,6 +973,7 @@ module Unix_tcp_server_ = struct done; (* Wait for all threads to be done: this only works if all threads are done. *) + Unix.close sock; Sem_.acquire self.sem_max_connections.max self.sem_max_connections; ()); }