commit f9b640c745da3ff881761b05ed8e4fc828406a32
parent 3f1e53eaad6d1969b3707e336696f1e01591948f
Author: Sheng <webmaster0115@gmail.com>
Date: Tue, 12 Mar 2019 21:52:17 +0800
Made it compatible with tornado 6
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/webssh/handler.py b/webssh/handler.py
@@ -405,7 +405,8 @@ class WsockHandler(MixinHandler, tornado.websocket.WebSocketHandler):
worker = workers.get(worker_id)
if worker:
workers[worker_id] = None
- self.set_nodelay(True)
+ if self.stream:
+ self.set_nodelay(True)
worker.set_handler(self)
self.worker_ref = weakref.ref(worker)
self.loop.add_handler(worker.fd, worker, IOLoop.READ)