From f8de674bd220986e623b0664fecdb1d1f4a77a46 Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 30 Jul 2017 10:57:44 +0200 Subject: [PATCH] Shut down server on SIGINT on Windows --- radicale/__main__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/radicale/__main__.py b/radicale/__main__.py index cc9cc49..b5542d4 100644 --- a/radicale/__main__.py +++ b/radicale/__main__.py @@ -256,9 +256,11 @@ def serve(configuration, logger): try: rlist, _, xlist = select.select( sockets, [], sockets, select_timeout) - except (KeyboardInterrupt, select.error): - # SIGINT is handled by signal handler above - rlist, xlist = [], [] + except select.error: + continue + except KeyboardInterrupt: + shutdown() + continue if xlist: raise RuntimeError("unhandled socket error") if rlist: