Skip to content

Commit

Permalink
Merge pull request #4392 from takluyver/tornado-6-ws-coroutine
Browse files Browse the repository at this point in the history
Call tornado WebSocketHandler.get() as a coroutine
  • Loading branch information
minrk authored Feb 25, 2019
2 parents bba82ca + 7c8db2d commit 0e28875
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion notebook/base/zmqhandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ def get(self, *args, **kwargs):
# assign and yield in two step to avoid tornado 3 issues
res = self.pre_get()
yield gen.maybe_future(res)
super(AuthenticatedZMQStreamHandler, self).get(*args, **kwargs)
res = super(AuthenticatedZMQStreamHandler, self).get(*args, **kwargs)
yield gen.maybe_future(res)

def initialize(self):
self.log.debug("Initializing websocket connection %s", self.request.path)
Expand Down

0 comments on commit 0e28875

Please sign in to comment.