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")
}
}
-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) {