diff options
Diffstat (limited to 'lib')
-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 |