Browse Source

Close websocket if there is no corresponding ssh connection

pull/296/merge
Sheng 2 years ago
parent
commit
2a46b52eac
  1. 6
      webssh/handler.py

6
webssh/handler.py

@ -566,7 +566,13 @@ class WsockHandler(MixinHandler, tornado.websocket.WebSocketHandler):
*self.src_addr
)
)
self.close(reason='No worker found')
return
if worker.closed:
self.close(reason='Worker closed')
return
try:
msg = json.loads(message)
except JSONDecodeError:

Loading…
Cancel
Save