fix: if authorizations check are required keyboard interruptions would be swallowed

pull/810/head
Smaarn 5 years ago
parent 7c061874fb
commit 908fb55940

@ -205,6 +205,9 @@ def redirect_root():
@custom_auth_basic(check_credentials) @custom_auth_basic(check_credentials)
def shutdown(): def shutdown():
authorize() authorize()
doShutdown()
def doShutdown():
try: try:
server.stop() server.stop()
except: except:
@ -2215,4 +2218,4 @@ try:
args.port) if args.port else str(settings.general.port)) + str(base_url)) args.port) if args.port else str(settings.general.port)) + str(base_url))
server.start() server.start()
except KeyboardInterrupt: except KeyboardInterrupt:
shutdown() doShutdown()

Loading…
Cancel
Save