From 32e85399bf000e63fbdb037259bd632ef4b8aa41 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 21:30:35 +0000 Subject: [PATCH] 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 --- parsedmarc/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parsedmarc/cli.py b/parsedmarc/cli.py index f3ef3ab..1d33448 100644 --- a/parsedmarc/cli.py +++ b/parsedmarc/cli.py @@ -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