Skip to content

Commit 1b12d62

Browse files
dennis-trasukunrt
authored andcommitted
swarm: add loopback to low timeout filter (#2595)
1 parent 53749bf commit 1b12d62

File tree

2 files changed

+1
-40
lines changed

2 files changed

+1
-40
lines changed

p2p/net/swarm/addrs.go

-39
This file was deleted.

p2p/net/swarm/swarm_dial.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ func (s *Swarm) filterKnownUndialables(p peer.ID, addrs []ma.Multiaddr) (goodAdd
507507
// limiting that occur without using extra goroutines per addr
508508
func (s *Swarm) limitedDial(ctx context.Context, p peer.ID, a ma.Multiaddr, resp chan transport.DialUpdate) {
509509
timeout := s.dialTimeout
510-
if lowTimeoutFilters.AddrBlocked(a) && s.dialTimeoutLocal < s.dialTimeout {
510+
if manet.IsPrivateAddr(a) && s.dialTimeoutLocal < s.dialTimeout {
511511
timeout = s.dialTimeoutLocal
512512
}
513513
s.limiter.AddDialJob(&dialJob{

0 commit comments

Comments
 (0)