Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix data race when querying GetElapsedTime()
`ExponentialBackOff.GetElapsedTime()` reads start time which is reset by `ExponentialBackOff.Reset()` which is called by `run()`, executed in a goroutine. This creates a data race just by using: ```go b := NewExponentialBackOff() ticker := backoff.NewTicker(b) b.GetElapsedTime() ``` This commit solves this by resetting the backoff timer outside the goroutine. The ticker test has been updated for this particular data race.
- Loading branch information