Commit abc21b87 authored by justcoding121's avatar justcoding121

remove lock on get

parent 022b4762
...@@ -94,10 +94,6 @@ namespace Titanium.Web.Proxy.Network.Tcp ...@@ -94,10 +94,6 @@ namespace Titanium.Web.Proxy.Network.Tcp
if (proxyServer.EnableConnectionPool) if (proxyServer.EnableConnectionPool)
{ {
try
{
await @lock.WaitAsync();
if (cache.TryGetValue(cacheKey, out var existingConnections)) if (cache.TryGetValue(cacheKey, out var existingConnections))
{ {
while (existingConnections.Count > 0) while (existingConnections.Count > 0)
...@@ -118,11 +114,6 @@ namespace Titanium.Web.Proxy.Network.Tcp ...@@ -118,11 +114,6 @@ namespace Titanium.Web.Proxy.Network.Tcp
} }
} }
} }
finally
{
@lock.Release();
}
}
var connection = await createClient(remoteHostName, remotePort, httpVersion, isHttps, var connection = await createClient(remoteHostName, remotePort, httpVersion, isHttps,
applicationProtocols, isConnect, proxyServer, upStreamEndPoint, externalProxy, cancellationToken); applicationProtocols, isConnect, proxyServer, upStreamEndPoint, externalProxy, cancellationToken);
......
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