Skip to content

Commit

Permalink
swarm: add loopback to low timeout filter (#2595)
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis-tra committed Oct 12, 2023
1 parent 805741b commit 1195bf5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 40 deletions.
39 changes: 0 additions & 39 deletions p2p/net/swarm/addrs.go

This file was deleted.

2 changes: 1 addition & 1 deletion p2p/net/swarm/swarm_dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ func (s *Swarm) filterKnownUndialables(p peer.ID, addrs []ma.Multiaddr) (goodAdd
// limiting that occur without using extra goroutines per addr
func (s *Swarm) limitedDial(ctx context.Context, p peer.ID, a ma.Multiaddr, resp chan dialResult) {
timeout := s.dialTimeout
if lowTimeoutFilters.AddrBlocked(a) && s.dialTimeoutLocal < s.dialTimeout {
if manet.IsPrivateAddr(a) && s.dialTimeoutLocal < s.dialTimeout {
timeout = s.dialTimeoutLocal
}
s.limiter.AddDialJob(&dialJob{
Expand Down

0 comments on commit 1195bf5

Please sign in to comment.