Commit 55cca706 authored by justcoding121's avatar justcoding121

properly dispose

parent 9e844a3a
......@@ -46,8 +46,13 @@ namespace Titanium.Web.Proxy.Network
}
catch (T ex)
{
await disposeConnection();
exception = ex;
await onRetry(ex);
}
catch
{
await disposeConnection();
throw;
}
if(exception == null)
......@@ -63,7 +68,7 @@ namespace Titanium.Web.Proxy.Network
}
//before retry clear connection
private async Task onRetry(Exception ex)
private async Task disposeConnection()
{
if (currentConnection != null)
{
......
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