1
0
Fork 0

[CLI] qmk docs graceful shutdown on Ctrl+C (#6989)

This commit is contained in:
fauxpark 2019-10-12 15:41:58 +11:00 committed by Drashna Jaelre
parent c54d2cbe02
commit 076d8babbb

View file

@ -19,4 +19,9 @@ def docs(cli):
cli.log.info("Serving QMK docs at http://localhost:%d/", cli.config.docs.port)
cli.log.info("Press Control+C to exit.")
httpd.serve_forever()
try:
httpd.serve_forever()
except KeyboardInterrupt:
cli.log.info("Stopping HTTP server...")
finally:
httpd.shutdown()