Skip to content

Commit

Permalink
less complaints in conduit-lwt-unix
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Jul 22, 2019
1 parent 6484325 commit c5c5959
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lwt-unix/conduit_lwt_tls_real.ml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module Client = struct
X509_lwt.authenticator `No_authentication_I'M_STUPID >>= fun authenticator ->
let config = Tls.Config.client ~authenticator () in
Lwt_unix.connect fd sa >>= fun () ->
let host = Domain_name.host_exn (Domain_name.of_string_exn host) in
Tls_lwt.Unix.client_of_fd config ~host fd >|= fun t ->
let ic, oc = Tls_lwt.of_t t in
(fd, ic, oc)
Expand Down
3 changes: 3 additions & 0 deletions lwt-unix/conduit_lwt_unix.ml
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ let endp_to_client ~ctx:_ (endp:Conduit.endp) : client Lwt.t =
host (Sexplib.Sexp.to_string_hum (Conduit.sexp_of_endp endp)))
end
| `Unknown err -> Lwt.fail_with ("resolution failed: " ^ err)
| _ -> assert false

let endp_to_server ~ctx (endp:Conduit.endp) =
match endp with
Expand All @@ -392,3 +393,5 @@ let endp_to_server ~ctx (endp:Conduit.endp) =
| `Vchan_domain_socket _ as mode -> Lwt.return mode
| `TLS (_host, _) -> Lwt.fail_with "TLS to non-TCP currently unsupported"
| `Unknown err -> Lwt.fail_with ("resolution failed: " ^ err)
| _ -> assert false

0 comments on commit c5c5959

Please sign in to comment.