1. Sebastien Mondet
  2. pvem_lwt_net

Commits

Sebastien Mondet  committed 222dfcf

lib: fix shutdown in TLS case

  • Participants
  • Parent commits c243819
  • Branches master

Comments (0)

Files changed (1)

File pvem_lwt_net.ml

View file
             (* most likely here: unix.accept has succeeded but OpenSSL
               failed, so the client maybe between unix and SSL connection,
               by shutting the socket down we should unblock it. *)
-            Lwt_unix.shutdown (fst accepted) Lwt_unix.SHUTDOWN_ALL;
+            begin try
+                Lwt_unix.shutdown (fst accepted) Lwt_unix.SHUTDOWN_ALL;
+            with _ -> ()
+            end;
             call_handler openssl
           end
         in