refactor(store): drop a redundant zero check in the cap warning
now.Sub of the zero time is already longer than a minute, so the first refusal is logged without a special case.
This commit is contained in:
parent
097314e8d9
commit
d22423c02c
1 changed files with 1 additions and 1 deletions
|
|
@ -812,7 +812,7 @@ func (s *Store) CreatePending(listID int64, addr, action string) (token string,
|
|||
func (s *Store) warnPendingCap(now time.Time, n int) {
|
||||
s.capLogMu.Lock()
|
||||
defer s.capLogMu.Unlock()
|
||||
if !s.capLoggedAt.IsZero() && now.Sub(s.capLoggedAt) < pendingCapLogEvery {
|
||||
if now.Sub(s.capLoggedAt) < pendingCapLogEvery {
|
||||
return
|
||||
}
|
||||
s.capLoggedAt = now
|
||||
|
|
|
|||
Loading…
Reference in a new issue