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

Update retry.go to handle hung operations #147

Open
wants to merge 5 commits into
base: v4
Choose a base branch
from

Conversation

MattCosturos
Copy link

Update retry.go to launch the operation in an asynchronous manner and deal with an operation that hangs

Update retry.go to launch the operation in an asynchronous manner and deal with an operation that hangs
@MattCosturos
Copy link
Author

The failing test cases are cases that return both a value and an error.

From a limited search, it seems that go conventions are to ignore result value when an error returned in non-nil. The code change I made, made it so it if the operation returns an error, then only the error is returned.

I suppose this would be a breaking change, I can re-work the code to return both error and result, if operation returns both, if that would be desired.

Adding test with simulated hang
Return Res + Error to avoid making a breaking change
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.

1 participant