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

This commit is contained in:
Fedor Korotkov
2022-05-21 00:26:43 +03:00
committed by GitHub
parent 35904dc637
commit afb23a3e3a
+6 -2
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