Exit keepalive request loop when self.alive is False

This commit is contained in:
Joe Kemp 2020-04-10 16:26:37 -04:00
parent 8cb2bd2329
commit 789605704c

View File

@ -42,7 +42,7 @@ class AsyncWorker(base.Worker):
else: else:
# keepalive loop # keepalive loop
proxy_protocol_info = {} proxy_protocol_info = {}
while True: while self.alive:
req = None req = None
with self.timeout_ctx(): with self.timeout_ctx():
req = next(parser) req = next(parser)