aboutsummaryrefslogtreecommitdiffstats
path: root/src/poolserver.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/poolserver.ml')
-rw-r--r--src/poolserver.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/poolserver.ml b/src/poolserver.ml
index 15a700c..850db3c 100644
--- a/src/poolserver.ml
+++ b/src/poolserver.ml
@@ -29,7 +29,9 @@ let new_server () =
let stop_srv _ =
Format.eprintf "Shutting down server...@.";
+ Hashtbl.iter (fun _ c -> c.disconnect()) server.clients;
shutdown server.sock SHUTDOWN_ALL;
+ close server.sock;
exit 0
in
Sys.set_signal Sys.sigint (Sys.Signal_handle stop_srv);