Skip to content

Commit 9fcd760

Browse files
committed
Construct retryable errors vector in-place.
1 parent ad8df6a commit 9fcd760

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/aws-cpp-sdk-core/source/auth/STSCredentialsProvider.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,9 @@ STSAssumeRoleWebIdentityCredentialsProvider::STSAssumeRoleWebIdentityCredentials
8585
config.scheme = Aws::Http::Scheme::HTTPS;
8686

8787
if (config.retryStrategy == nullptr) {
88-
Aws::Vector<Aws::String> retryableErrors;
89-
retryableErrors.push_back("IDPCommunicationError");
90-
retryableErrors.push_back("InvalidIdentityToken");
88+
Aws::Vector<Aws::String> retryableErrors{ "IDPCommunicationError", "InvalidIdentityToken" };
9189

92-
config.retryStrategy = Aws::MakeShared<SpecifiedRetryableErrorsRetryStrategy>(STS_ASSUME_ROLE_WEB_IDENTITY_LOG_TAG, retryableErrors, 3/*maxRetries*/);
90+
config.retryStrategy = Aws::MakeShared<SpecifiedRetryableErrorsRetryStrategy>(STS_ASSUME_ROLE_WEB_IDENTITY_LOG_TAG, std::move(retryableErrors), 3/*maxRetries*/);
9391
}
9492

9593
m_client = Aws::MakeUnique<Aws::Internal::STSCredentialsClient>(STS_ASSUME_ROLE_WEB_IDENTITY_LOG_TAG, config);

0 commit comments

Comments
 (0)