diff --git a/gunicorn/workers/base_async.py b/gunicorn/workers/base_async.py index 6a79d7ed0..9f648a17d 100644 --- a/gunicorn/workers/base_async.py +++ b/gunicorn/workers/base_async.py @@ -36,7 +36,8 @@ def handle(self, listener, client, addr): parser = http.RequestParser(self.cfg, client, addr) try: listener_name = listener.getsockname() - if not self.cfg.keepalive: + # do not allow keepalive if the worker is about to be restarted + if not self.cfg.keepalive or not self.alive: req = next(parser) self.handle_request(listener_name, req, client, addr) else: