Continue on OS.SysErr in server loop
[hcoop/domtool2.git] / src / main.sml
index 59607bb..19162a3 100644 (file)
@@ -287,6 +287,11 @@ fun slave () =
                            OpenSSL.close bio
                                          handle OpenSSL.OpenSSL _ => ();
                            loop ())
+                        | OS.SysErr (s, _) =>
+                          (print ("System error: "^ s ^ "\n");
+                           OpenSSL.close bio
+                           handle OpenSSL.OpenSSL _ => ();
+                           loop ())
     in
        loop ();
        OpenSSL.shutdown sock