|
|
@ -471,7 +471,11 @@ func (r *PEXReactor) dialPeer(addr *p2p.NetAddress) { |
|
|
|
attempts, lastDialed := r.dialAttemptsInfo(addr) |
|
|
|
|
|
|
|
if attempts > maxAttemptsToDial { |
|
|
|
r.Logger.Error("Reached max attempts to dial", "addr", addr, "attempts", attempts) |
|
|
|
// Do not log the message if the addr gets readded.
|
|
|
|
if attempts+1 == maxAttemptsToDial { |
|
|
|
r.Logger.Info("Reached max attempts to dial", "addr", addr, "attempts", attempts) |
|
|
|
r.attemptsToDial.Store(addr.DialString(), _attemptsToDial{attempts + 1, time.Now()}) |
|
|
|
} |
|
|
|
r.book.MarkBad(addr) |
|
|
|
return |
|
|
|
} |
|
|
|