fix: udpate

parent a624f51e
......@@ -158,6 +158,13 @@ class SSHws(Namespace, BaseWebSocketHandler):
del self.clients[request.sid]["client"][connection]
client.close()
def logout(self, connection):
if connection and (request.sid in self.clients.keys()):
if connection in self.clients[request.sid]["proxy"].keys():
del self.clients[request.sid]["proxy"][connection]
if connection in self.clients[request.sid]["forwarder"].keys():
del self.clients[request.sid]["client"][connection]
class HttpServer:
# prepare may be rewrite it
......
......@@ -228,5 +228,5 @@ class WSProxy:
def close(self):
self.stop_event.set()
self.child.close()
self.ws.emit("logout", {'room': self.connection})
self.ws.logout(self.connection)
logger.debug("Proxy {} closed".format(self))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment