added a stat item to the server

This commit is contained in:
2024-12-16 01:03:03 +09:00
parent fe67d9e16f
commit ec6577aed2
4 changed files with 15 additions and 5 deletions

View File

@@ -572,6 +572,7 @@ func (pxy *server_proxy_ssh_ws) ServeWebsocket(ws *websocket.Conn) {
var n int
var err error
s.stats.ssh_proxy_sessions.Add(1)
buf = make([]byte, 2048)
for {
n, err = out.Read(buf)
@@ -589,6 +590,7 @@ func (pxy *server_proxy_ssh_ws) ServeWebsocket(ws *websocket.Conn) {
}
}
}
s.stats.ssh_proxy_sessions.Add(-1)
}
}()