mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-29 06:28:45 +03:00
Force HTTP/1.1
Signed-off-by: Alex Baker <alex@beeper.com> Change-Id: I0a71fafa883f8e15f06ceccae8edcc81ce550309
This commit is contained in:
parent
d9e3602ea9
commit
e3c4a9157e
2 changed files with 3 additions and 0 deletions
1
changelog.d/4669.bugfix
Normal file
1
changelog.d/4669.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix sync timeout after returning from background
|
|
@ -22,6 +22,7 @@ import dagger.Module
|
||||||
import dagger.Provides
|
import dagger.Provides
|
||||||
import okhttp3.ConnectionSpec
|
import okhttp3.ConnectionSpec
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
|
import okhttp3.Protocol
|
||||||
import okhttp3.logging.HttpLoggingInterceptor
|
import okhttp3.logging.HttpLoggingInterceptor
|
||||||
import org.matrix.android.sdk.BuildConfig
|
import org.matrix.android.sdk.BuildConfig
|
||||||
import org.matrix.android.sdk.api.MatrixConfiguration
|
import org.matrix.android.sdk.api.MatrixConfiguration
|
||||||
|
@ -71,6 +72,7 @@ internal object NetworkModule {
|
||||||
val spec = ConnectionSpec.Builder(matrixConfiguration.connectionSpec).build()
|
val spec = ConnectionSpec.Builder(matrixConfiguration.connectionSpec).build()
|
||||||
|
|
||||||
return OkHttpClient.Builder()
|
return OkHttpClient.Builder()
|
||||||
|
.protocols(listOf(Protocol.HTTP_1_1))
|
||||||
.connectTimeout(30, TimeUnit.SECONDS)
|
.connectTimeout(30, TimeUnit.SECONDS)
|
||||||
.readTimeout(60, TimeUnit.SECONDS)
|
.readTimeout(60, TimeUnit.SECONDS)
|
||||||
.writeTimeout(60, TimeUnit.SECONDS)
|
.writeTimeout(60, TimeUnit.SECONDS)
|
||||||
|
|
Loading…
Reference in a new issue