Skip to content

Commit

Permalink
Fix OciRegistryApi retry: only retry when closed before response
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Mar 10, 2024
1 parent b5627d2 commit a42f20e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,9 @@ internal class OciRegistryApi(httpClient: HttpClient) {
}
}

private val RETRY_SPEC: RetrySpec = Retry.max(3).filter { error -> error is PrematureCloseException }
private val RETRY_SPEC: RetrySpec = Retry.max(3).filter { error ->
(error is PrematureCloseException) && (error.message?.contains("BEFORE response") == true)
}

private class DigestVerifyingFlux(
source: Flux<ByteBuf>,
Expand Down

0 comments on commit a42f20e

Please sign in to comment.