Commit 94712cc9 authored by Matt Joiner's avatar Matt Joiner

Add an error for no addresses

parent bec19839
...@@ -289,7 +289,11 @@ func (s *Swarm) dial(ctx context.Context, p peer.ID) (*Conn, error) { ...@@ -289,7 +289,11 @@ func (s *Swarm) dial(ctx context.Context, p peer.ID) (*Conn, error) {
the improved rate limiter, while maintaining the outward behaviour the improved rate limiter, while maintaining the outward behaviour
that we previously had (halting a dial when we run out of addrs) that we previously had (halting a dial when we run out of addrs)
*/ */
goodAddrs := s.filterKnownUndialables(s.peers.Addrs(p)) peerAddrs := s.peers.Addrs(p)
if len(peerAddrs) == 0 {
return nil, errors.New("no addresses")
}
goodAddrs := s.filterKnownUndialables(peerAddrs)
if len(goodAddrs) == 0 { if len(goodAddrs) == 0 {
return nil, errors.New("no good addresses") return nil, errors.New("no good addresses")
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment