Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http: fix websocket broadcasts in Tornado 5.x (#1796)
In Tornado 4.x and earlier, IOLoop.current() would return the global IOLoop if there was no IOLoop already running in the calling thread. This was the case when calling our websocket broadcast method from the HttpFrontend thread and so callbacks were correctly scheduled on the HttpServer thread's IOLoop. However, in Tornado 5.0+, the idea of a global IOLoop is gone and calling IOLoop.current() will simply create a new IOLoop if there isn't one already running in the calling thread. This incorrectly resulted in callbacks being scheduled on that new IOLoop which is never actually started and so the broadcasts were never sent. This is related to #1716. (cherry picked from commit 59a3935)
- Loading branch information
1 parent
5bcb4ca
commit c5a62f9
Showing
4 changed files
with
15 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters