diff options
author | Clombrong <cromblong@egregore.fun> | 2025-08-27 00:39:26 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-08-27 00:39:26 +0200 |
commit | 3404ee0f98bf80631f48e5586d5f5290b1a324f9 (patch) | |
tree | 940b39c158249121618443431610068596ef6e2f | |
parent | 7e600cdbcb9d6ec4684eabd0961f5d271162ede3 (diff) |
refactor(starttls): return a socket on upgrade
-rw-r--r-- | lib/starttls.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/starttls.ml b/lib/starttls.ml index c1e10cf..8b297f5 100644 --- a/lib/starttls.ml +++ b/lib/starttls.ml @@ -31,10 +31,10 @@ let parse_reply response = | _ -> `Error (** [upgrade portal] upgrades the Portal to STARTTLS. *) -let upgrade (portal : Portal.t) : unit Lwt.t = +let upgrade (portal : Portal.t) : Portal.socket Lwt.t = portal.push (Some stanza); let* response = Segment.get portal.stream in match parse_reply response with | `Failure | `Error -> Lwt.fail STARTTLSFailure - | `Proceed -> Portal.starttls portal + | `Proceed -> Portal.starttls portal._socket |