Skip to content

Commit e3d6cbc

Browse files
committed
consolidate low dial timeout private filter to use manet
1 parent 44db2b4 commit e3d6cbc

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 dialResult) {
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)