Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit ed3ce01

Browse files
committed
remove caching which can cause errors
1 parent 65b923f commit ed3ce01

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

Titanium.Web.Proxy/Helpers/CertificateManager.cs

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ protected async virtual Task<X509Certificate2> CreateCertificate(X509Store store
129129
}
130130

131131
store.Close();
132+
132133
if (certificate != null && !certificateCache.ContainsKey(certificateName))
133134
certificateCache.Add(certificateName, new CachedCertificate() { Certificate = certificate });
134135

Titanium.Web.Proxy/Network/TcpConnectionManager.cs

-8
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,6 @@ internal static async Task<TcpConnection> GetClient(ConnectRequest connectReques
8080
if (cached == null)
8181
cached = await CreateClient(connectRequest, hostname, port, isHttps, version).ConfigureAwait(false);
8282

83-
84-
//just create one more preemptively
85-
if (cachedConnections == null || cachedConnections.Count() < 2)
86-
{
87-
var task = CreateClient(connectRequest, hostname, port, isHttps, version)
88-
.ContinueWith(async (x) => { if (x.Status == TaskStatus.RanToCompletion) await ReleaseClient(x.Result); });
89-
}
90-
9183
return cached;
9284
}
9385

0 commit comments

Comments
 (0)