Skip to content

Commit

Permalink
fix: changes to fix lifetime issues when multiple sdks are in use (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
kneekey23 authored Dec 2, 2021
1 parent e3e4097 commit 5d22f46
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import ClientRuntime

public struct AWSCredentialsProviderChainDefaultConfig {
let shutDownCallback: ShutDownCallback?
private let sharedDefaultIO: SDKDefaultIO = SDKDefaultIO.shared

public init(shutDownCallback: ShutDownCallback? = nil) {
self.shutDownCallback = shutDownCallback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public struct AWSCredentialsProviderContainerConfig {
public let host: String?
public let pathAndQuery: String?
public let shutDownCallback: ShutDownCallback?
private let sharedDefaultIO: SDKDefaultIO = SDKDefaultIO.shared

init(authToken: String? = nil,
host: String? = nil,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public struct AWSCredentialsProviderSTSConfig {
public let sessionName: String
public let durationSeconds: UInt16
public let shutDownCallback: ShutDownCallback?
private let sharedDefaultIO: SDKDefaultIO = SDKDefaultIO.shared

public init(credentialsProvider: AWSCredentialsProvider,
roleArn: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import ClientRuntime

public struct AWSCredentialsProviderWebIdentityConfig {
public let shutDownCallback: ShutDownCallback?
private let sharedDefaultIO: SDKDefaultIO = SDKDefaultIO.shared

public init(shutDownCallback: ShutDownCallback? = nil) {
self.shutDownCallback = shutDownCallback
Expand Down
1 change: 1 addition & 0 deletions AWSClientRuntime/Sources/IMDS/IMDSClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import ClientRuntime
/// See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html#instance-metadata-transition-to-version-2 for more information.
public class IMDSClient {
let crtIMDSClient: CRTIMDSClient
private let sharedDefaultIO: SDKDefaultIO = SDKDefaultIO.shared

public init(config: IMDSConfig = IMDSConfig()) {
let crtConfig = config.toCRTConfig()
Expand Down

0 comments on commit 5d22f46

Please sign in to comment.