Skip to content

Instantly share code, notes, and snippets.

@rarous
Created December 21, 2012 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rarous/4352819 to your computer and use it in GitHub Desktop.
Save rarous/4352819 to your computer and use it in GitHub Desktop.
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