From 522b536601ee5996f6833f6d78e5df5fa0c6f971 Mon Sep 17 00:00:00 2001 From: Christopher Zimmermann Date: Sun, 21 Jun 2020 07:47:31 +0200 Subject: [PATCH] use close-notify for unidirectional shutdown ocaml-ssl's shutdown does a bi-directional shutdown. --- src/conduit-lwt-unix/conduit_lwt_unix_ssl.real.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/conduit-lwt-unix/conduit_lwt_unix_ssl.real.ml b/src/conduit-lwt-unix/conduit_lwt_unix_ssl.real.ml index 39515c03..2134e7ec 100644 --- a/src/conduit-lwt-unix/conduit_lwt_unix_ssl.real.ml +++ b/src/conduit-lwt-unix/conduit_lwt_unix_ssl.real.ml @@ -22,7 +22,9 @@ let () = Ssl.init () let chans_of_fd sock = let is_open = ref true in let shutdown () = - if !is_open then Lwt_ssl.ssl_shutdown sock else Lwt.return_unit + if !is_open + then Lwt_ssl.close_notify sock >|= ignore + else Lwt.return_unit in let close () = is_open := false;