From 450edcde9e61d3884c72e7453a67ff6fcea38d18 Mon Sep 17 00:00:00 2001 From: Clombrong Date: Sun, 29 Jun 2025 05:56:53 +0200 Subject: fix(portal_tcp): fix TLS error message --- portal/tcp/portal.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'portal') diff --git a/portal/tcp/portal.ml b/portal/tcp/portal.ml index 865e74e..7d508fe 100644 --- a/portal/tcp/portal.ml +++ b/portal/tcp/portal.ml @@ -169,9 +169,9 @@ let upgrade_to_tls (fd : Lwt_unix.file_descr) : Tls_lwt.Unix.t Lwt.t = with Failure msg -> Lwt.fail_with msg let starttls (portal : t) : unit Lwt.t = - let s = match portal._socket with + let* s = match portal._socket with | Plain s -> s - | Tls _ -> failwith "gjgehwgiorg" + | Tls _ -> Lwt.fail_with "TLS is already enabled on this socket!" in let+ tls_sock = upgrade_to_tls s in let sock = Tls tls_sock -- cgit v1.2.3