From 1df8e21ee80f62289d684f6fe99ba220b782f85c Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 17 Mar 2016 15:27:31 +0100 Subject: [PATCH] Random port --- ocaml/Qmcchem_dataserver.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ocaml/Qmcchem_dataserver.ml b/ocaml/Qmcchem_dataserver.ml index f63c21b..1f16c2b 100644 --- a/ocaml/Qmcchem_dataserver.ml +++ b/ocaml/Qmcchem_dataserver.ml @@ -106,11 +106,11 @@ let run ?(daemon=true) ezfio_filename = (** Random port number between 49152 and 65535 *) let port = let newport = - ref 10000 + ref ( 1024 + (Random.int (49151-1024))) in while ((check_port !newport) = `Unavailable) do - newport := !newport + 100 + newport := 1024 + (Random.int (49151-1024)) done; !newport in