fs: remove unnecessary pacer warning

This commit is contained in:
Fabian Möller 2019-02-18 08:42:36 +01:00
parent 61616ba864
commit 8f4ea77c07
No known key found for this signature in database
GPG Key ID: 70B29D65DD8A7E31

View File

@ -1139,15 +1139,6 @@ func NewPacer(c pacer.Calculator) *Pacer {
} }
func (d *logCalculator) Calculate(state pacer.State) time.Duration { func (d *logCalculator) Calculate(state pacer.State) time.Duration {
type causer interface {
Cause() error
}
if c, ok := state.LastError.(causer); ok {
state.LastError = c.Cause()
} else {
Logf("pacer", "Invalid error in fs.Pacer: %t", state.LastError)
}
oldSleepTime := state.SleepTime oldSleepTime := state.SleepTime
newSleepTime := d.Calculator.Calculate(state) newSleepTime := d.Calculator.Calculate(state)
if state.ConsecutiveRetries > 0 { if state.ConsecutiveRetries > 0 {