Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tornado: Fix race condition on handler._request.
Commit 6fd1a55 (zulip#21469) introduced an await point where get_events_backend calls fetch_events in order to switch threads. This opened the possibility that, in the window between the connect_handler call in fetch_events and the old location of this assignment in get_events_backend, an event could arrive, causing ClientDescriptor.add_event to crash on missing handler._request. Fix this by assigning handler._request earlier. Signed-off-by: Anders Kaseorg <anders@zulip.com>
- Loading branch information