From 8ba5a1eb5f32f8c3646863956aae8d6448cee203 Mon Sep 17 00:00:00 2001 From: Eric Bowen Date: Fri, 1 Jun 2012 22:11:19 -0600 Subject: [PATCH] Bug fix: changed retry logic from > to >= to eliminate bug that was causing one retry even though MaxErrorRetry was set to zero --- Amazon.Runtime/AmazonWebServiceClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Amazon.Runtime/AmazonWebServiceClient.cs b/Amazon.Runtime/AmazonWebServiceClient.cs index c5f600078ae1..dc2474788ea2 100644 --- a/Amazon.Runtime/AmazonWebServiceClient.cs +++ b/Amazon.Runtime/AmazonWebServiceClient.cs @@ -745,7 +745,7 @@ private static bool isTemporaryRedirect(HttpStatusCode statusCode, string redire /// True if the failed request should be retried. public static bool ShouldRetry(HttpStatusCode statusCode, ClientConfig config, AmazonServiceException errorResponseException, int retries) { - if (retries > config.MaxErrorRetry) + if (retries >= config.MaxErrorRetry) { return false; }