From b1bde151131c67d122413deee3c6bfe4f04f0382 Mon Sep 17 00:00:00 2001 From: benoitc Date: Sun, 21 Dec 2014 09:41:09 +0100 Subject: [PATCH] check if the parent is alive --- gunicorn/workers/gthread.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gunicorn/workers/gthread.py b/gunicorn/workers/gthread.py index 579f9d83..df60951f 100644 --- a/gunicorn/workers/gthread.py +++ b/gunicorn/workers/gthread.py @@ -194,6 +194,9 @@ class ThreadWorker(base.Worker): callback = key.data callback(key.fileobj) + if not self.is_parent_alive(): + break + # hanle keepalive timeouts self.murder_keepalived()