If I have an async task (e.g. something using an HttpClient
) that times out, the task throws a TaskCanceledException
.
I want to be able to retry the task. But the problem is that a Task can only be executed once.
What's the easiest way of resetting or cloning the task so I can try execute it again? Or an alternative approach so I can retry an Http timeout (other than setting a longer timeout threshold)?