From 0d32a9adddfc8966be0236580122dcd2a3a7ae1e Mon Sep 17 00:00:00 2001 From: OmarAlJarrah Date: Mon, 16 Dec 2024 15:46:06 +0300 Subject: [PATCH] fix: inconsistent custom okhttp configuration --- .../com/expediagroup/sdk/core/client/BaseRapidClient.kt | 5 ++++- .../kotlin/com/expediagroup/sdk/core/client/BaseXapClient.kt | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/main/kotlin/com/expediagroup/sdk/core/client/BaseRapidClient.kt b/core/src/main/kotlin/com/expediagroup/sdk/core/client/BaseRapidClient.kt index 52d20daa3..9dee8b404 100644 --- a/core/src/main/kotlin/com/expediagroup/sdk/core/client/BaseRapidClient.kt +++ b/core/src/main/kotlin/com/expediagroup/sdk/core/client/BaseRapidClient.kt @@ -43,7 +43,10 @@ abstract class BaseRapidClient( private val engine: HttpClientEngine = _configurationProvider.okHttpClient?.let { OkHttp.create { - preconfigured = it + config { + preconfigured = it + dispatcher(it.dispatcher) + } } } ?: httpClientEngine diff --git a/core/src/main/kotlin/com/expediagroup/sdk/core/client/BaseXapClient.kt b/core/src/main/kotlin/com/expediagroup/sdk/core/client/BaseXapClient.kt index 19ef01d16..fb87dc254 100644 --- a/core/src/main/kotlin/com/expediagroup/sdk/core/client/BaseXapClient.kt +++ b/core/src/main/kotlin/com/expediagroup/sdk/core/client/BaseXapClient.kt @@ -43,7 +43,10 @@ abstract class BaseXapClient( private val engine: HttpClientEngine = _configurationProvider.okHttpClient?.let { OkHttp.create { - preconfigured = it + config { + preconfigured = it + dispatcher(it.dispatcher) + } } } ?: httpClientEngine