when channel is closed, outbound always by use
maxiloEmmmm opened this issue · comments
chisel/share/tunnel/tunnel_in_proxy_udp.go
Line 155 in 4eb9e6a
maybe rm outbound when req chan close?
like this
move set outbound nil to func
chisel/share/tunnel/tunnel_in_proxy_udp.go
Line 185 in 4eb9e6a
func (u *udpListener) unsetUDPChan(sshConn ssh.Conn) {
sshConn.Wait()
u.onLoseChannel()
}
func (u *udpListener) onLoseChannel() {
u.Debugf("lost channel")
u.outboundMut.Lock()
u.outbound = nil
u.outboundMut.Unlock()
}
call onLoseChannel after chan close
chisel/share/tunnel/tunnel_in_proxy_udp.go
Line 171 in 4eb9e6a
go func() {
ssh.DiscardRequests(reqs)
// channel done...
u.onLoseChannel()
}()