Skip to content

Commit 0e28875

Browse files
authored
Merge pull request #4392 from takluyver/tornado-6-ws-coroutine
Call tornado WebSocketHandler.get() as a coroutine
2 parents bba82ca + 7c8db2d commit 0e28875

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

notebook/base/zmqhandlers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ def get(self, *args, **kwargs):
281281
# assign and yield in two step to avoid tornado 3 issues
282282
res = self.pre_get()
283283
yield gen.maybe_future(res)
284-
super(AuthenticatedZMQStreamHandler, self).get(*args, **kwargs)
284+
res = super(AuthenticatedZMQStreamHandler, self).get(*args, **kwargs)
285+
yield gen.maybe_future(res)
285286

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

0 commit comments

Comments
 (0)