From 7df260930c21e6994cc0404ac33db77fb65d71cc Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Fri, 13 Feb 2026 02:01:38 +0100 Subject: [PATCH] fix(ctl): use 'result' key from dirty protocol response The dirty protocol response uses 'result' not 'data' for the payload. --- gunicorn/ctl/handlers.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gunicorn/ctl/handlers.py b/gunicorn/ctl/handlers.py index 690c9842..83480389 100644 --- a/gunicorn/ctl/handlers.py +++ b/gunicorn/ctl/handlers.py @@ -503,13 +503,11 @@ class CommandHandlers: sock.close() if response.get("type") == DirtyProtocol.MSG_TYPE_RESPONSE: - data = response.get("data", {}) - return data.get("workers", []) + result = response.get("result", {}) + return result.get("workers", []) - except Exception as e: - # Log error for debugging - if hasattr(self.arbiter, 'log') and self.arbiter.log: - self.arbiter.log.debug("Failed to query dirty workers: %s", e) + except Exception: + pass return []