Skip to content

Commit 2c0a4d1

Browse files
committed
Added workaround for okhttp issue square/okhttp#3146
1 parent a0b9107 commit 2c0a4d1

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [0.12.4]
5+
6+
### Fixed
7+
- Fixed an issue that prevented repeated network calls would reuse dead connection
8+
pools and result in network errors even when network was available again
9+
- Subtitle visibility for recycled shopping cart cells
10+
411
## [0.12.3]
512

613
### Fixed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ allprojects {
2323
}
2424

2525
project.ext {
26-
sdkVersion='0.12.3'
26+
sdkVersion='0.12.4'
2727
versionCode=1
2828

2929
compileSdkVersion=28

core/src/main/java/io/snabble/sdk/OkHttpClientFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package io.snabble.sdk;
22

33
import android.app.Application;
4-
import io.snabble.sdk.auth.SnabbleAuthorizationInterceptor;
4+
import java.util.concurrent.TimeUnit;
55
import io.snabble.sdk.utils.Logger;
66
import okhttp3.Cache;
77
import okhttp3.CertificatePinner;
@@ -27,8 +27,8 @@ static OkHttpClient createOkHttpClient(Application application) {
2727
OkHttpClient.Builder builder = new OkHttpClient.Builder();
2828

2929
builder.cache(new Cache(application.getCacheDir(), 10485760)); //10 MB
30-
3130
builder.retryOnConnectionFailure(true);
31+
builder.pingInterval(5, TimeUnit.SECONDS); // workaround for https://github.com/square/okhttp/issues/3146
3232

3333
HttpLoggingInterceptor logging = new HttpLoggingInterceptor(
3434
new HttpLoggingInterceptor.Logger() {

0 commit comments

Comments
 (0)