Init HTTP client only if Registry is used (#99)

This commit is contained in:
Fedor Korotkov 2022-05-20 17:26:43 -04:00 committed by GitHub
parent 35904dc637
commit afb23a3e3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -72,9 +72,13 @@ struct TokenResponse: Decodable {
}
}
fileprivate let httpClient = HTTPClient(eventLoopGroupProvider: .createNew)
class Registry {
private let httpClient = HTTPClient(eventLoopGroupProvider: .createNew)
deinit {
try! httpClient.syncShutdown()
}
var baseURL: URL
var namespace: String