Commits

Sebastien Mondet committed 222dfcf

lib: fix shutdown in TLS case

Comments (0)

Files changed (1)

             (* 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