Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
tornado: Fix race condition on handler._request.
Anders Kaseorge112b619ccd9
diff --git a/zerver/tornado/views.py b/zerver/tornado/views.pyindex a886f85e3a1..1ad831ef0f5 100644--- a/zerver/tornado/views.py+++ b/zerver/tornado/views.py@@ -125,6 +125,7 @@ def get_events_backend(assert tornado_handler is not Nonehandler = tornado_handler()assert handler is not None+ handler._request = requestif user_client is None:valid_user_client = RequestNotes.get_notes(request).client@@ -173,7 +174,6 @@ def get_events_backend(# Return an AsynchronousResponse; this will result in# Tornado discarding the response and instead long-polling the# request. See zulip_finish for more design details.- handler._request = requestreturn AsynchronousResponse()if result["type"] == "error":raise result["exception"]