Shut down server on SIGINT on Windows
This commit is contained in:
parent
d6435c36c9
commit
f8de674bd2
@ -256,9 +256,11 @@ def serve(configuration, logger):
|
|||||||
try:
|
try:
|
||||||
rlist, _, xlist = select.select(
|
rlist, _, xlist = select.select(
|
||||||
sockets, [], sockets, select_timeout)
|
sockets, [], sockets, select_timeout)
|
||||||
except (KeyboardInterrupt, select.error):
|
except select.error:
|
||||||
# SIGINT is handled by signal handler above
|
continue
|
||||||
rlist, xlist = [], []
|
except KeyboardInterrupt:
|
||||||
|
shutdown()
|
||||||
|
continue
|
||||||
if xlist:
|
if xlist:
|
||||||
raise RuntimeError("unhandled socket error")
|
raise RuntimeError("unhandled socket error")
|
||||||
if rlist:
|
if rlist:
|
||||||
|
Loading…
Reference in New Issue
Block a user