Skip to content

Commit

Permalink
Fix compatility with tornado 6 (#2001)
Browse files Browse the repository at this point in the history
  • Loading branch information
waghanza authored and tilgovi committed Jun 4, 2019
1 parent b157129 commit dc7b5d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gunicorn/workers/gtornado.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ def run(self):
# instance of tornado.web.Application or is an
# instance of tornado.wsgi.WSGIApplication
app = self.wsgi
if not isinstance(app, tornado.web.Application) or \
isinstance(app, tornado.wsgi.WSGIApplication):
app = WSGIContainer(app)

if tornado.version_info[0] < 6:
if not isinstance(app, tornado.web.Application) or \
isinstance(app, tornado.wsgi.WSGIApplication):
app = WSGIContainer(app)

# Monkey-patching HTTPConnection.finish to count the
# number of requests being handled by Tornado. This
Expand Down

0 comments on commit dc7b5d5

Please sign in to comment.