Skip to content

Commit

Permalink
Add connection timeout for HTTP clients created by AWSClient
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Nov 7, 2020
1 parent 1638da0 commit 859ff69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/SotoCore/AWSClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ public final class AWSClient {
case .shared(let providedHTTPClient):
self.httpClient = providedHTTPClient
case .createNewWithEventLoopGroup(let elg):
self.httpClient = AsyncHTTPClient.HTTPClient(eventLoopGroupProvider: .shared(elg))
self.httpClient = AsyncHTTPClient.HTTPClient(eventLoopGroupProvider: .shared(elg), configuration: .init(timeout: .init(connect: .seconds(10))))
case .createNew:
self.httpClient = AsyncHTTPClient.HTTPClient(eventLoopGroupProvider: .createNew)
self.httpClient = AsyncHTTPClient.HTTPClient(eventLoopGroupProvider: .createNew, configuration: .init(timeout: .init(connect: .seconds(10))))
}

self.credentialProvider = credentialProviderFactory.createProvider(context: .init(
Expand Down

0 comments on commit 859ff69

Please sign in to comment.