Skip to content

Commit b301950

Browse files
committed
Revert "Shorten the defeult timeout of individual call to backend (#620)"
This reverts commit 87f0f85.
1 parent 4fd6ee7 commit b301950

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

src/Microsoft.Extensions.Configuration.AzureAppConfiguration/AzureAppConfigurationOptions.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the MIT license.
33
//
44
using Azure.Core;
5-
using Azure.Core.Pipeline;
65
using Azure.Data.AppConfiguration;
76
using Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureKeyVault;
87
using Microsoft.Extensions.Configuration.AzureAppConfiguration.Extensions;
@@ -11,7 +10,6 @@
1110
using System;
1211
using System.Collections.Generic;
1312
using System.Linq;
14-
using System.Net.Http;
1513
using System.Threading.Tasks;
1614

1715
namespace Microsoft.Extensions.Configuration.AzureAppConfiguration
@@ -24,7 +22,6 @@ public class AzureAppConfigurationOptions
2422
{
2523
private const int MaxRetries = 2;
2624
private static readonly TimeSpan MaxRetryDelay = TimeSpan.FromMinutes(1);
27-
private static readonly TimeSpan NetworkTimeout = TimeSpan.FromSeconds(10);
2825
private static readonly KeyValueSelector DefaultQuery = new KeyValueSelector { KeyFilter = KeyFilter.Any, LabelFilter = LabelFilter.Null };
2926

3027
private List<KeyValueWatcher> _individualKvWatchers = new List<KeyValueWatcher>();
@@ -513,10 +510,6 @@ private static ConfigurationClientOptions GetDefaultClientOptions()
513510
clientOptions.Retry.MaxDelay = MaxRetryDelay;
514511
clientOptions.Retry.Mode = RetryMode.Exponential;
515512
clientOptions.AddPolicy(new UserAgentHeaderPolicy(), HttpPipelinePosition.PerCall);
516-
clientOptions.Transport = new HttpClientTransport(new HttpClient()
517-
{
518-
Timeout = NetworkTimeout
519-
});
520513

521514
return clientOptions;
522515
}

src/Microsoft.Extensions.Configuration.AzureAppConfiguration/AzureAppConfigurationProvider.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,13 +1221,6 @@ await ExecuteWithFailOverPolicyAsync<object>(clients, async (client) =>
12211221

12221222
private bool IsFailOverable(AggregateException ex)
12231223
{
1224-
TaskCanceledException tce = ex.InnerExceptions?.LastOrDefault(e => e is TaskCanceledException) as TaskCanceledException;
1225-
1226-
if (tce != null && tce.InnerException is TimeoutException)
1227-
{
1228-
return true;
1229-
}
1230-
12311224
RequestFailedException rfe = ex.InnerExceptions?.LastOrDefault(e => e is RequestFailedException) as RequestFailedException;
12321225

12331226
return rfe != null ? IsFailOverable(rfe) : false;

0 commit comments

Comments
 (0)