Fixed OCaml

This commit is contained in:
Anthony Scemama 2018-07-09 19:21:59 +02:00
parent 1542964710
commit 87fed8350a
1 changed files with 4 additions and 4 deletions

View File

@ -59,22 +59,22 @@ let full_run ?(start_dataserver=true) ezfio_filename =
and address =
Ezfio.get_simulation_http_server ()
in
Zmq.Socket.set_receive_timeout socket 100;
let reply =
try
(
Zmq.Socket.set_receive_timeout socket 100;
Zmq.Socket.connect socket address;
Zmq.Socket.send socket (Message.(to_string Test));
Zmq.Socket.recv socket
) with
| Unix.Unix_error (_,_,_) ->
begin
Zmq.Socket.set_linger_period socket 1 ;
Zmq.Socket.close socket;
Zmq.Context.terminate zmq_context;
"Failed"
end
in
Zmq.Socket.set_linger_period socket 1 ;
Zmq.Socket.close socket;
Zmq.Context.terminate zmq_context;
reply = "OK"
in