Explorar el Código

Revert "Shut down server on SIGINT on Windows"

This reverts commit f8de674bd220986e623b0664fecdb1d1f4a77a46.
Unrud hace 8 años
padre
commit
d34ee1217d
Se han modificado 1 ficheros con 3 adiciones y 5 borrados
  1. 3 5
      radicale/__main__.py

+ 3 - 5
radicale/__main__.py

@@ -256,11 +256,9 @@ def serve(configuration, logger):
         try:
             rlist, _, xlist = select.select(
                 sockets, [], sockets, select_timeout)
-        except select.error:
-            continue
-        except KeyboardInterrupt:
-            shutdown()
-            continue
+        except (KeyboardInterrupt, select.error):
+            # SIGINT is handled by signal handler above
+            rlist, xlist = [], []
         if xlist:
             raise RuntimeError("unhandled socket error")
         if rlist: