Use try block to bypass the error

pull/58/head
Sheng 6 years ago
parent 544461a617
commit b630116f33

@ -405,8 +405,10 @@ class WsockHandler(MixinHandler, tornado.websocket.WebSocketHandler):
worker = workers.get(worker_id) worker = workers.get(worker_id)
if worker: if worker:
workers[worker_id] = None workers[worker_id] = None
if self.stream: try:
self.set_nodelay(True) self.set_nodelay(True)
except AssertionError: # tornado 6.00 bug
pass
worker.set_handler(self) worker.set_handler(self)
self.worker_ref = weakref.ref(worker) self.worker_ref = weakref.ref(worker)
self.loop.add_handler(worker.fd, worker, IOLoop.READ) self.loop.add_handler(worker.fd, worker, IOLoop.READ)

Loading…
Cancel
Save