This commit is contained in:
Neil Alexander 2020-08-07 17:38:43 +01:00
parent ba243cf90f
commit 5788fa500e
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -134,7 +134,7 @@ func (s *ServerStatistics) BackoffIfRequired(backingOff atomic.Bool, interrupt <
// Work out how long we should be backing off for.
duration := time.Second * time.Duration(math.Exp2(float64(count)))
logrus.Debugf("Backing off %q for %s", s.serverName, duration)
logrus.Warnf("Backing off %q for %s", s.serverName, duration)
// Wait for either an interruption or for the backoff to
// complete.
@ -144,10 +144,6 @@ func (s *ServerStatistics) BackoffIfRequired(backingOff atomic.Bool, interrupt <
case <-time.After(duration):
}
// Drain the interrupt queue - helps with tests.
for range interrupt {
}
return duration
}