Commit 3f430f34 authored by justcoding121's avatar justcoding121

fix retry

parent 4debbe81
......@@ -32,9 +32,9 @@ namespace Titanium.Web.Proxy.Network
Exception exception = null;
var attempts = retries;
while (attempts >= 0)
while (true)
{
try
{
//setup connection
......@@ -49,15 +49,17 @@ namespace Titanium.Web.Proxy.Network
exception = ex;
}
if(exception == null
attempts--;
if (attempts < 0
|| exception == null
|| !(exception is T))
{
break;
}
exception = null;
await disposeConnection();
attempts--;
await disposeConnection();
}
return new RetryResult(currentConnection, exception, @continue);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment