diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/core/ClientOptions.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/core/ClientOptions.kt index b464747..a385766 100644 --- a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/core/ClientOptions.kt +++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/core/ClientOptions.kt @@ -11,6 +11,7 @@ import org.onebusaway.core.http.RetryingHttpClient 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, @@ -47,7 +48,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 @@ -140,6 +141,7 @@ private constructor( this.queryParams.forEach(queryParams::replaceValues) return ClientOptions( + httpClient!!, RetryingHttpClient.builder() .httpClient(httpClient!!) .clock(clock)