mirror of
https://github.com/rclone/rclone.git
synced 2024-12-24 16:09:01 +01:00
fs: remove unnecessary pacer warning
This commit is contained in:
parent
61616ba864
commit
8f4ea77c07
9
fs/fs.go
9
fs/fs.go
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user