10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-23 04:43:50 +01:00

Fixed OCaml Address in use

This commit is contained in:
Anthony Scemama 2017-03-06 18:46:04 +01:00
parent a0736ce4e1
commit d01ed36a27

View File

@ -65,7 +65,11 @@ let bind_socket ~socket_type ~socket ~port =
let filename = let filename =
Printf.sprintf "/tmp/qp_run:%d" port Printf.sprintf "/tmp/qp_run:%d" port
in in
Sys.remove filename; begin
match Sys.file_exists filename with
| `Yes -> Sys.remove filename
| _ -> ()
end;
ZMQ.Socket.bind socket ("ipc://"^filename) ZMQ.Socket.bind socket ("ipc://"^filename)