Don't start another holepunch rendezvous if we're handling one
This commit is contained in:
parent
92bba56b87
commit
9352f6cf8e
@ -771,7 +771,9 @@ func (cl *Client) dialAndCompleteHandshake(opts outgoingConnOpts) (c *PeerConn,
|
||||
if !opts.receivedHolepunchConnect {
|
||||
g.MakeMapIfNilAndSet(&cl.undialableWithoutHolepunch, holepunchAddr, struct{}{})
|
||||
}
|
||||
opts.t.startHolepunchRendezvous(holepunchAddr)
|
||||
if !opts.skipHolepunchRendezvous {
|
||||
opts.t.trySendHolepunchRendezvous(holepunchAddr)
|
||||
}
|
||||
cl.unlock()
|
||||
}
|
||||
err = fmt.Errorf("all initial dials failed")
|
||||
|
@ -2825,7 +2825,7 @@ func (t *Torrent) handleReceivedUtHolepunchMsg(msg utHolepunch.Msg, sender *Peer
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Torrent) startHolepunchRendezvous(addrPort netip.AddrPort) error {
|
||||
func (t *Torrent) trySendHolepunchRendezvous(addrPort netip.AddrPort) error {
|
||||
rzsSent := 0
|
||||
for pc := range t.conns {
|
||||
if !pc.supportsExtension(utHolepunch.ExtensionName) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user