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

TryCatchRetry.RunWithDelayAsync(..) first argument #47

Open
artemious7 opened this issue May 28, 2017 · 1 comment
Open

TryCatchRetry.RunWithDelayAsync(..) first argument #47

artemious7 opened this issue May 28, 2017 · 1 comment

Comments

@artemious7
Copy link

The TryCatchRetry.RunWithDelayAsync(..) methods seem to work incorrectly because of the first argument - being Task or IAsyncOperation.
This line
await task;
doesn't actually re-run the task. It will always return the faulted task, so that whole purpose of the TryCatchRetry logic is lost.
Instead of receiving a Task argument, we should take a Func<Task> as the first argument.

Am I getting it wrong?

@xyzzer
Copy link
Owner

xyzzer commented May 30, 2017

You're most likely correct. Bonus points for a pull request and extra points for a unit test! :)
Sorry if I caused you trouble by adding untested code to the toolkit!

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

No branches or pull requests

2 participants