Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lwt_unix.{Versioned.bind_2 -> bind} #197

Merged
merged 2 commits into from
Jan 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/channel_helper.ml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ let advertise_t _common_options_t proxy_socket =

let s_ip = Lwt_unix.socket Lwt_unix.PF_INET Lwt_unix.SOCK_STREAM 0 in
(* INET socket, can't block *)
Lwt_unix.Versioned.bind_2 s_ip (Lwt_unix.ADDR_INET(Unix.inet_addr_of_string !ip, 0)) >>= fun () ->
Lwt_unix.bind s_ip (Lwt_unix.ADDR_INET(Unix.inet_addr_of_string !ip, 0)) >>= fun () ->
Lwt_unix.listen s_ip 5;
let port = match Lwt_unix.getsockname s_ip with
| Unix.ADDR_INET(_, port) -> port
Expand All @@ -94,7 +94,7 @@ let advertise_t _common_options_t proxy_socket =
let path = Printf.sprintf "%s/%s.%d" !unix
(Filename.basename Sys.argv.(0)) (Unix.getpid ()) in
if Sys.file_exists path then Unix.unlink path;
Lwt_unix.Versioned.bind_2 s_unix (Lwt_unix.ADDR_UNIX path) >>= fun () ->
Lwt_unix.bind s_unix (Lwt_unix.ADDR_UNIX path) >>= fun () ->
List.iter (fun signal ->
ignore(Lwt_unix.on_signal signal (fun _ -> Unix.unlink path; exit 1))
) [ Sys.sigterm; Sys.sigint ];
Expand Down
4 changes: 2 additions & 2 deletions xcp.opam
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ depends: [
"base-threads"
"base-unix"
"cmdliner"
"cohttp" {< "0.22.0"}
"cohttp"
"fd-send-recv"
"jbuilder" {build & >= "1.0+beta11"}
"lwt" {< "3.0.0" & >= "2.7.1"}
"lwt" {>= "3.0.0"}
"message-switch-core"
"message-switch-unix"
"ocamlfind" {build}
Expand Down