lnd: time.Since instead of time.Now().Sub(...)

This commit is contained in:
Andras Banki-Horvath 2020-04-14 17:57:44 +02:00
parent fe59890a4b
commit 633ea71ad1

View File

@ -2448,7 +2448,7 @@ func (s *server) nextPeerBackoff(pubStr string,
// The peer succeeded in starting. If the connection didn't last long
// enough to be considered stable, we'll continue to back off retries
// with this peer.
connDuration := time.Now().Sub(startTime)
connDuration := time.Since(startTime)
if connDuration < defaultStableConnDuration {
return computeNextBackoff(backoff)
}