Close websocket if there is no corresponding ssh connection

pull/296/merge
Sheng 2 years ago
parent 9a7cfe767c
commit 2a46b52eac

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

Loading…
Cancel
Save