aboutsummaryrefslogtreecommitdiff
path: root/portal/tcp/portal.ml
diff options
context:
space:
mode:
authorClombrong <cromblong@egregore.fun>2025-06-29 05:56:53 +0200
committerClombrong <cromblong@egregore.fun>2025-06-29 05:56:53 +0200
commit450edcde9e61d3884c72e7453a67ff6fcea38d18 (patch)
tree062c28cb34beb88423f57f6da783a3629c7631e2 /portal/tcp/portal.ml
parent02970cff77ba21b1f53eebe311fa1d663079e06e (diff)
fix(portal_tcp): fix TLS error message
Diffstat (limited to 'portal/tcp/portal.ml')
-rw-r--r--portal/tcp/portal.ml4
1 files changed, 2 insertions, 2 deletions
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