OCI: always read channel until end (#284)

This commit is contained in:
Nikolay Edigaryev 2022-10-18 19:44:14 +04:00 committed by GitHub
parent 39e1b84423
commit 0e77f14dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -295,6 +295,7 @@ class Registry {
var (channel, response) = try await authAwareRequest(request: request)
if doAuth && response.statusCode == HTTPCode.Unauthorized.rawValue {
_ = try await channel.asData()
try await auth(response: response)
(channel, response) = try await authAwareRequest(request: request)
}