bug fix timeout en cliente OkHttp
This commit is contained in:
parent
c6c32e54fb
commit
f19baf59d6
@ -7,6 +7,7 @@ import okhttp3.OkHttpClient
|
|||||||
import retrofit2.Retrofit
|
import retrofit2.Retrofit
|
||||||
import retrofit2.converter.gson.GsonConverterFactory
|
import retrofit2.converter.gson.GsonConverterFactory
|
||||||
import java.time.ZonedDateTime
|
import java.time.ZonedDateTime
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
|
||||||
@ -25,6 +26,9 @@ class RetrofitClient @Inject constructor(private val authenticationInterceptor:
|
|||||||
|
|
||||||
private val okHttpClient get() = OkHttpClient.Builder()
|
private val okHttpClient get() = OkHttpClient.Builder()
|
||||||
.addInterceptor(authenticationInterceptor)
|
.addInterceptor(authenticationInterceptor)
|
||||||
|
.connectTimeout(5, TimeUnit.MINUTES)
|
||||||
|
.writeTimeout(5, TimeUnit.MINUTES)
|
||||||
|
.readTimeout(5, TimeUnit.MINUTES)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
private val gson = GsonBuilder()
|
private val gson = GsonBuilder()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user