Fix AsyncDjangoHandler view exception code path.

The recent Tornado memory leak fix
(1396eb7022) didn't use the correct
variable name for the current handler ID, causing this cleanup code to
fail in the event that a view raised an exception.
This commit is contained in:
Tim Abbott
2016-03-19 22:45:18 -07:00
parent 9e3c3e14f5
commit 320428052a

View File

@@ -245,7 +245,7 @@ class AsyncDjangoHandler(tornado.web.RequestHandler, base.BaseHandler):
async_request_stop(request)
return None
except Exception as e:
clear_handler_by_id(self.current_handler_id)
clear_handler_by_id(self.handler_id)
# If the view raised an exception, run it through exception
# middleware, and if the exception middleware returns a
# response, use that. Otherwise, reraise the exception.