diff --git a/src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj b/src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj
index 2db5ef0..f422771 100644
--- a/src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj
+++ b/src/CasCap.Apis.GooglePhotos/CasCap.Apis.GooglePhotos.csproj
@@ -28,7 +28,7 @@
-
+
diff --git a/src/CasCap.Apis.GooglePhotos/Extensions/DI.cs b/src/CasCap.Apis.GooglePhotos/Extensions/DI.cs
index 9811e32..77b0396 100644
--- a/src/CasCap.Apis.GooglePhotos/Extensions/DI.cs
+++ b/src/CasCap.Apis.GooglePhotos/Extensions/DI.cs
@@ -55,11 +55,14 @@ static void AddServices(this IServiceCollection services,
{
AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate
})
- .AddTransientHttpErrorPolicy(policyBuilder =>
- {
- return policyBuilder.RetryAsync(retryCount: 3);
- })
//https://github.com/aspnet/AspNetCore/issues/6804
- .SetHandlerLifetime(Timeout.InfiniteTimeSpan);
+ .SetHandlerLifetime(Timeout.InfiniteTimeSpan)
+ .AddStandardResilienceHandler((options) =>
+ {
+ options.Retry = new Http.Resilience.HttpRetryStrategyOptions
+ {
+ Delay = TimeSpan.FromSeconds(30)
+ };
+ });
}
}