X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fuwobo%2Fuwobo.ml;h=a9755885d2463f65490c4f263c1d0ccc0f09c02d;hb=024e92b8b3bf29e41ce50004c37d884baa1db847;hp=5d67eacfad328ac7270d91dfd64b6468bcd5db5e;hpb=79538d65a060641788bae111438edb705119a4cd;p=helm.git diff --git a/helm/uwobo/uwobo.ml b/helm/uwobo/uwobo.ml index 5d67eacfa..a9755885d 100644 --- a/helm/uwobo/uwobo.ml +++ b/helm/uwobo/uwobo.ml @@ -225,11 +225,11 @@ let start_new_session cmd_pipe res_pipe outchan port logfile = (* Let's check that the port is free *) (try ignore - (Http_client.Convenience.http_head_message + (Http_client.http_get ("http://127.0.0.1:" ^ string_of_int port ^ "/help")) ; raise (Failure "Port already in use") with - Failure "Connection refused" -> () + Unix.Unix_error (Unix.ECONNREFUSED, _, _) -> () ) ; match Unix.fork () with 0 -> @@ -258,9 +258,12 @@ let start_new_session cmd_pipe res_pipe outchan port logfile = (* let's check if the new UWOBO started correctly *) Unix.sleep 5 ; (* It can raise Failure "Connection refused" *) - ignore - (Http_client.Convenience.http_head_message - ("http://127.0.0.1:" ^ string_of_int port ^ "/help")) + (try + ignore + (Http_client.http_get + ("http://127.0.0.1:" ^ string_of_int port ^ "/help")) + with Unix.Unix_error (Unix.ECONNREFUSED, _, _) -> + raise (Failure "Connection refused")) | _ -> failwith "Can't fork :-(" ;;