Created
December 21, 2012 13:27
-
-
Save rarous/4352819 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task<Result> ProcessInner(ConnectorRequest message, int attempts) | |
{ | |
return inner.ProcessMessageAsync(message).ContinueWith(t => | |
{ | |
if (t.Result.IsSuccess || attempts == 0) | |
return t.Result; | |
return ProcessInner(message, attempts--).Result; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment