lnd: time.Since instead of time.Now().Sub(...)
This commit is contained in:
parent
fe59890a4b
commit
633ea71ad1
@ -2448,7 +2448,7 @@ func (s *server) nextPeerBackoff(pubStr string,
|
|||||||
// The peer succeeded in starting. If the connection didn't last long
|
// The peer succeeded in starting. If the connection didn't last long
|
||||||
// enough to be considered stable, we'll continue to back off retries
|
// enough to be considered stable, we'll continue to back off retries
|
||||||
// with this peer.
|
// with this peer.
|
||||||
connDuration := time.Now().Sub(startTime)
|
connDuration := time.Since(startTime)
|
||||||
if connDuration < defaultStableConnDuration {
|
if connDuration < defaultStableConnDuration {
|
||||||
return computeNextBackoff(backoff)
|
return computeNextBackoff(backoff)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user