Skip to content

Commit daa1bde

Browse files
committed
Backport PR #4392: Call tornado WebSocketHandler.get() as a coroutine
This change will probably be needed for Tornado 6. bdarnell figured it out. https://groups.google.com/d/msg/python-tornado/mSeG7Kc6z4o/baeTDOvJGgAJ Signed-off-by: Min RK <[email protected]>
1 parent cf3622c commit daa1bde

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

notebook/base/zmqhandlers.py

+2-1
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)