refactor: remove unuse variable and channel

This commit is contained in:
2025-07-21 12:10:08 +07:00
parent 32f9765374
commit 66f1492466
3 changed files with 24 additions and 37 deletions

View File

@ -15,19 +15,17 @@ const (
func New(conn *ssh.ServerConn, sshChannel <-chan ssh.NewChannel, req <-chan *ssh.Request) *Session {
session := &Session{
Status: SETUP,
Slug: "",
ConnChannels: []ssh.Channel{},
Connection: conn,
GlobalRequest: req,
TunnelType: UNKNOWN,
SlugChannel: make(chan bool),
Done: make(chan bool),
Status: SETUP,
Slug: "",
ConnChannel: nil,
Connection: conn,
TunnelType: UNKNOWN,
Done: make(chan bool),
}
go func() {
for newChannel := range sshChannel {
go session.HandleSessionChannel(newChannel)
go session.HandleSessionChannel(newChannel, req)
}
}()