hotfix: close ssh session

This commit is contained in:
fengcaiwen
2025-04-27 23:02:06 +08:00
parent 6edfc3127d
commit 79f8aca7df

View File

@@ -38,7 +38,7 @@ func (s *sshHandler) Handle(ctx context.Context, conn net.Conn) {
}),
Handler: ssh.Handler(func(s ssh.Session) {
io.WriteString(s, "Remote forwarding available...\n")
select {}
<-s.Context().Done()
}),
ReversePortForwardingCallback: ssh.ReversePortForwardingCallback(func(ctx ssh.Context, host string, port uint32) bool {
plog.G(ctx).Infoln("attempt to bind", host, port, "granted")