Fix _reload_requested tight-loop: reset flag before reload to capture concurrent SIGHUPs

Co-authored-by: seanthegeek <44679+seanthegeek@users.noreply.github.com>
Agent-Logs-Url: https://github.com/domainaware/parsedmarc/sessions/879d0bb1-9037-41f7-bc89-f59611956d2e
This commit is contained in:
copilot-swe-agent[bot]
2026-03-20 21:30:35 +00:00
parent c3876bb9d9
commit 32e85399bf

View File

@@ -2027,7 +2027,10 @@ def _main():
if not _reload_requested:
break
# Reload configuration
# Reload configuration — clear the flag first so that any new
# SIGHUP arriving while we reload will be captured for the next
# iteration rather than being silently dropped.
_reload_requested = False
logger.info("Reloading configuration...")
try:
# Build a fresh opts starting from CLI-only defaults so that