Skip to content

Commit 7c8db2d

Browse files
committed
Call tornado WebSocketHandler.get() as a coroutine
This change will probably be needed for Tornado 6. Ben Darnell figured it out. https://groups.google.com/d/msg/python-tornado/mSeG7Kc6z4o/baeTDOvJGgAJ
1 parent 8a4cbd0 commit 7c8db2d

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)