summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2014-05-25 01:35:56 +0200
committerAlex AUVOLAT <alex.auvolat@ens.fr>2014-05-25 01:35:56 +0200
commit98edbb390a41d09301d2005f60f8d80ebc201da2 (patch)
tree3e370cb2c6215d73e778e3e7a036b425f6884e12 /src
parent101ab9ca8c3e026592f648de202f8f2b62644474 (diff)
downloadSystemeReseaux-Projet-98edbb390a41d09301d2005f60f8d80ebc201da2.tar.gz
SystemeReseaux-Projet-98edbb390a41d09301d2005f60f8d80ebc201da2.zip
Shutdown stuff.
Diffstat (limited to 'src')
-rw-r--r--src/manager.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/manager.ml b/src/manager.ml
index 0da7df2..2e856fd 100644
--- a/src/manager.ml
+++ b/src/manager.ml
@@ -220,6 +220,9 @@ let rec server_run server =
end
end
+let server_shutdown server =
+ if !my_addr <> "" then shutdown server.sock SHUTDOWN_ALL
+
(* Main function *)
@@ -299,6 +302,6 @@ let () =
end;
server_run server;
- shutdown server.sock SHUTDOWN_ALL;
+ server_shutdown server;
List.iter (fun pid -> ignore (waitpid [] pid)) !pids