Skip to content

Commit

Permalink
fix(client): accidental double-wrapping with RetryingHttpClient
Browse files Browse the repository at this point in the history
chore: unknown commit message
  • Loading branch information
stainless-bot authored and Stainless Bot committed Oct 25, 2024
1 parent 5bab5cc commit c96911b
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,
@get:JvmName("httpClient") val httpClient: HttpClient,
@get:JvmName("jsonMapper") val jsonMapper: JsonMapper,
@get:JvmName("clock") val clock: Clock,
Expand Down Expand Up @@ -51,7 +52,7 @@ private constructor(

@JvmSynthetic
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 @@ -160,6 +161,7 @@ private constructor(
this.queryParams.forEach(queryParams::replaceValues)

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

0 comments on commit c96911b

Please sign in to comment.