From df82cac7d98fee717473b004482a31b702581176 Mon Sep 17 00:00:00 2001 From: duanhongyi Date: Wed, 25 Aug 2021 13:54:50 +0800 Subject: [PATCH] fix: gunicorn run tornado app failed --- gunicorn/workers/gtornado.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gunicorn/workers/gtornado.py b/gunicorn/workers/gtornado.py index 9dd3d7bc..d3bd6d6b 100644 --- a/gunicorn/workers/gtornado.py +++ b/gunicorn/workers/gtornado.py @@ -110,7 +110,8 @@ class TornadoWorker(Worker): if not isinstance(app, tornado.web.Application) or \ isinstance(app, tornado.wsgi.WSGIApplication): app = WSGIContainer(app) - elif not isinstance(app, WSGIContainer): + elif not isinstance(app, WSGIContainer) and \ + not isinstance(app, tornado.web.Application): app = WSGIContainer(app) # Monkey-patching HTTPConnection.finish to count the