From ee47b0030d1472ae4185e40278638073f7d3885c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E5=BF=97=E8=90=8D?= Date: Sat, 24 Dec 2016 08:02:50 +0800 Subject: [PATCH] threadWorker cancelled request should decrease nr_conns (#1387) --- gunicorn/workers/gthread.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gunicorn/workers/gthread.py b/gunicorn/workers/gthread.py index fcdcc7a7..f9281588 100644 --- a/gunicorn/workers/gthread.py +++ b/gunicorn/workers/gthread.py @@ -243,6 +243,7 @@ class ThreadWorker(base.Worker): def finish_request(self, fs): if fs.cancelled(): + self.nr_conns -= 1 fs.conn.close() return