mirror of
https://github.com/huashengdun/webssh.git
synced 2026-08-20 04:36:42 +00:00
Close websocket if there is no corresponding ssh connection
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user