Commit 171d3e8e authored by justcoding121's avatar justcoding121

refeactor cleanup

parent 7597ecc0
...@@ -189,7 +189,8 @@ namespace Titanium.Web.Proxy ...@@ -189,7 +189,8 @@ namespace Titanium.Web.Proxy
prefetchTask = null; prefetchTask = null;
} }
// create a new connection if cache key changes // create a new connection if cache key changes.
// only gets hit when connection pool is disabled.
if (serverConnection != null if (serverConnection != null
&& (await getConnectionCacheKey(args, false, && (await getConnectionCacheKey(args, false,
clientConnection.NegotiatedApplicationProtocol) clientConnection.NegotiatedApplicationProtocol)
...@@ -245,7 +246,8 @@ namespace Titanium.Web.Proxy ...@@ -245,7 +246,8 @@ namespace Titanium.Web.Proxy
break; break;
} }
if (args.WebSession.ServerConnection == null) //user requested
if (args.WebSession.Response.TerminateResponse)
{ {
closeServerConnection = true; closeServerConnection = true;
return; return;
......
...@@ -62,10 +62,6 @@ namespace Titanium.Web.Proxy ...@@ -62,10 +62,6 @@ namespace Titanium.Web.Proxy
// syphon out the response body from server before setting the new body // syphon out the response body from server before setting the new body
await args.SyphonOutBodyAsync(false, cancellationToken); await args.SyphonOutBodyAsync(false, cancellationToken);
} }
else
{
args.WebSession.ServerConnection = null;
}
return; return;
} }
......
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