Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lock on Retry #72

Closed
wants to merge 1 commit into from
Closed

Add lock on Retry #72

wants to merge 1 commit into from

Conversation

Jleagle
Copy link

@Jleagle Jleagle commented Mar 5, 2019

This fixes a race condition that can be caused by a package re-using a BackOff.

If Retry() is called twice with the same instance of a BackOff, one may Reset() the other.

This was found using Go's -race flag. Thanks.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 85.106% when pulling ebeb868 on Jleagle:master into 1e4cf3d on cenkalti:master.

@cenkalti
Copy link
Owner

cenkalti commented Mar 6, 2019

You can use your own mutex. I don't want to put a mutex into the package.

@cenkalti cenkalti closed this Mar 6, 2019
@Jleagle
Copy link
Author

Jleagle commented Mar 6, 2019

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants