chisel
chisel copied to clipboard
when channel is closed, outbound always by use
https://github.com/jpillora/chisel/blob/4eb9e6a87ff57d16c94fe01f98d31d455ab4f759/share/tunnel/tunnel_in_proxy_udp.go#L155
maybe rm outbound when req chan close? like this
move set outbound nil to func https://github.com/jpillora/chisel/blob/4eb9e6a87ff57d16c94fe01f98d31d455ab4f759/share/tunnel/tunnel_in_proxy_udp.go#L185
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 https://github.com/jpillora/chisel/blob/4eb9e6a87ff57d16c94fe01f98d31d455ab4f759/share/tunnel/tunnel_in_proxy_udp.go#L171
go func() {
ssh.DiscardRequests(reqs)
// channel done...
u.onLoseChannel()
}()