fix(serve): reject a config reload whose validation exits instead of stopping the server

This commit is contained in:
imSp4rky
2026-11-28 16:03:35 -07:00
parent ab338e4a3c
commit ed743a81b9
3 changed files with 25 additions and 8 deletions
+2 -2
View File
@@ -256,8 +256,8 @@ def reload_config(app: web.Application, *, no_key: bool, serve_widevine: bool, s
fresh = Config.from_yaml(config_module.config_path)
serve = fresh.serve
api_secret = _prepare_serve(serve, no_key, fresh)
except Exception as e:
log.error(f"Config reload rejected, keeping the running config: {e}")
except (Exception, SystemExit) as e:
log.error(f"Config reload rejected, keeping the running config: {str(e).removeprefix('ERROR: ')}")
return False
changed = [k for k in RESTART_KEYS if serve.get(k) != config.serve.get(k)]