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

Commit 2c11272

Browse files
committed
#826 Set retry attempts to zero as workaround fix
1 parent 5e5225f commit 2c11272

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Titanium.Web.Proxy/ProxyServer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ public ProxyServer(string? rootCertificateName, string? rootCertificateIssuerNam
121121
private SystemProxyManager? systemProxySettingsManager { get; }
122122

123123
/// <summary>
124-
/// Number of exception retries when connection pool is enabled.
124+
/// Number of times to retry upon network failures when connection pool is enabled.
125125
/// </summary>
126-
private int retries => EnableConnectionPool ? MaxCachedConnections : 0;
126+
public int NetworkFailureRetryAttempts { get; set; } = 0;
127127

128128
/// <summary>
129129
/// Is the proxy currently running?
@@ -928,7 +928,7 @@ internal async Task InvokeServerConnectionCreateEvent(Socket serverSocket)
928928
/// </summary>
929929
private RetryPolicy<T> retryPolicy<T>() where T : Exception
930930
{
931-
return new RetryPolicy<T>(retries, tcpConnectionFactory);
931+
return new RetryPolicy<T>(NetworkFailureRetryAttempts, tcpConnectionFactory);
932932
}
933933

934934
private bool disposed = false;

tests/Titanium.Web.Proxy.IntegrationTests/NestedProxyTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ await client.PostAsync(new Uri(server.ListeningHttpsUrl),
176176
}
177177

178178

179-
//Try reproduce bug reported so that we can fix it.
179+
//Reproduce bug reported so that we can fix it.
180180
//https://github.com/justcoding121/titanium-web-proxy/issues/826
181181
[TestMethod]
182182
[Timeout(2 * 60 * 1000)]

0 commit comments

Comments
 (0)