Use try block to bypass the error

pull/58/head
Sheng 2019-03-12 23:47:06 +08:00
parent 544461a617
commit b630116f33
1 changed files with 3 additions and 1 deletions

View File

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