Continue on OS.SysErr in server loop
authorAdam Chlipala <adamc@hcoop.net>
Sat, 9 Dec 2006 21:03:06 +0000 (21:03 +0000)
committerAdam Chlipala <adamc@hcoop.net>
Sat, 9 Dec 2006 21:03:06 +0000 (21:03 +0000)
src/main.sml

index 59607bb..19162a3 100644 (file)
@@ -287,6 +287,11 @@ fun slave () =
                            OpenSSL.close bio
                                          handle OpenSSL.OpenSSL _ => ();
                            loop ())
                            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
     in
        loop ();
        OpenSSL.shutdown sock