blob: ec4e3733048eba49928f785583f1188f5746227d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/SpecifiedRetryableErrorsRetryStrategy.h>
#include <aws/core/client/AWSError.h>
using namespace Aws;
using namespace Aws::Client;
bool SpecifiedRetryableErrorsRetryStrategy::ShouldRetry(const AWSError<CoreErrors>& error, long attemptedRetries) const
{
if (attemptedRetries >= m_maxRetries)
{
return false;
}
for (const auto& err: m_specifiedRetryableErrors)
{
if (error.GetExceptionName() == err)
{
return true;
}
}
return error.ShouldRetry();
}
|