aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorClombrong <cromblong@egregore.fun>2025-06-29 19:35:42 +0200
committerClombrong <cromblong@egregore.fun>2025-06-29 19:42:31 +0200
commit68eb85e653ab43d838906d0424abb7ada3e489c1 (patch)
treebd4201678b37cc306bcaebf78dea553e27929c9f /lib
parent387691a094ee45156e0c1e9a74d92ae739dea61c (diff)
style(stream): rename handle_feature to negotiate_feature
Diffstat (limited to 'lib')
-rw-r--r--lib/stream.ml4
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)