From 789605704c3c31a951108fdbdd1a1e885b905b29 Mon Sep 17 00:00:00 2001 From: Joe Kemp Date: Fri, 10 Apr 2020 16:26:37 -0400 Subject: [PATCH] Exit keepalive request loop when self.alive is False --- gunicorn/workers/base_async.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gunicorn/workers/base_async.py b/gunicorn/workers/base_async.py index 7b2daf91b..cbc2606f6 100644 --- a/gunicorn/workers/base_async.py +++ b/gunicorn/workers/base_async.py @@ -42,7 +42,7 @@ def handle(self, listener, client, addr): else: # keepalive loop proxy_protocol_info = {} - while True: + while self.alive: req = None with self.timeout_ctx(): req = next(parser)