Are there any other ways to retry logic?
C#:
bool redo = false;
const int maxRetries = 3;
int retries = 0;
do
{
try
{
HttpWebRequest req = (HttpWebRequest) WebRequest.Create("http://www.google.com");
req.Timeout = 10000;
HttpWebResponse res = (HttpWebResponse) req.GetResponse();
}catch (TimeoutException e)
{
Console.WriteLine(e.Message);
redo = true;
++retries;
}
}while (redo && retries < maxRetries) ;