Skip to content

Commit

Permalink
fix(client): accidental double-wrapping with RetryingHttpClient (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and Stainless Bot committed Nov 1, 2024
1 parent 9f537ed commit 2825bb9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import java.time.Clock

class ClientOptions
private constructor(
private val originalHttpClient: HttpClient,
val httpClient: HttpClient,
val jsonMapper: JsonMapper,
val clock: Clock,
Expand Down Expand Up @@ -50,7 +51,7 @@ private constructor(
private var webhookSecret: String? = null

internal fun from(clientOptions: ClientOptions) = apply {
httpClient = clientOptions.httpClient
httpClient = clientOptions.originalHttpClient
jsonMapper = clientOptions.jsonMapper
clock = clientOptions.clock
baseUrl = clientOptions.baseUrl
Expand Down Expand Up @@ -150,6 +151,7 @@ private constructor(
this.queryParams.forEach(queryParams::replaceValues)

return ClientOptions(
httpClient!!,
RetryingHttpClient.builder()
.httpClient(httpClient!!)
.clock(clock)
Expand Down

0 comments on commit 2825bb9

Please sign in to comment.