diff options
-rw-r--r-- | lib/stream.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stream.ml b/lib/stream.ml index ac8c08b..535fe99 100644 --- a/lib/stream.ml +++ b/lib/stream.ml @@ -69,7 +69,7 @@ let authenticate mechanisms (portal : Portal.t) config = | Ok _ -> print_endline "Success!"; Lwt.return_unit else Lwt.fail InsufficientEncryption -let handle_feature (mandatory : bool) (feat : feature) (portal : Portal.t) +let negotiate_feature (mandatory : bool) (feat : feature) (portal : Portal.t) ({starttls; sasl; _} : config) : unit Lwt.t = match feat with | STARTTLS -> if mandatory || starttls.prefer_starttls @@ -103,7 +103,7 @@ let negotiate in let rec handle_features (f : features) : features Lwt.t = match f with - | m :: mandatory, optional -> let* () = handle_feature true m portal config + | m :: mandatory, optional -> let* () = negotiate_feature true m portal config in if needs_restart m then start_stream () >>= handle_features else handle_features (mandatory, optional) |