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,7 +49,10 @@ namespace Titanium.Web.Proxy.Network
exception = ex;
}
if(exception == null
attempts--;
if (attempts < 0
|| exception == null
|| !(exception is T))
{
break;
......@@ -57,7 +60,6 @@ namespace Titanium.Web.Proxy.Network
exception = null;
await disposeConnection();
attempts--;
}
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