Skip to content

Commit

Permalink
Merge pull request #283 from martenrebane/MOPPAND-894-2
Browse files Browse the repository at this point in the history
Increased timeouts
  • Loading branch information
kristelmerilain authored Aug 5, 2022
2 parents fe1e883 + 220cb52 commit 88ffb74
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appVersionCode=37
appVersionCode=39
appVersionName=2.4.5

appAbiFilters=arm64-v8a;armeabi-v7a;x86;x86_64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ public static <S> S createService(Class<S> serviceClass, SSLContext sslContext,
private static OkHttpClient buildHttpClient(SSLContext sslContext, String midSignServiceUrl, ArrayList<String> certBundle, TrustManager[] trustManagers, Context context) throws CertificateException, NoSuchAlgorithmException {
Timber.log(Log.DEBUG, "Building new httpClient");
OkHttpClient.Builder httpClientBuilder = new OkHttpClient.Builder()
.connectTimeout(30, TimeUnit.SECONDS)
.connectTimeout(120, TimeUnit.SECONDS)
.readTimeout(120, TimeUnit.SECONDS)
.writeTimeout(120, TimeUnit.SECONDS)
.pingInterval(3, TimeUnit.SECONDS)
.certificatePinner(trustedCertificates(midSignServiceUrl, certBundle));
addLoggingInterceptor(httpClientBuilder, context);
if (sslContext != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ private static OkHttpClient buildHttpClient(String sidSignServiceUrl, ArrayList<
throws CertificateException, NoSuchAlgorithmException {
Timber.log(Log.DEBUG, "Building new httpClient");
OkHttpClient.Builder httpClientBuilder = new OkHttpClient.Builder()
.connectTimeout(30, TimeUnit.SECONDS)
.connectTimeout(120, TimeUnit.SECONDS)
.readTimeout(120, TimeUnit.SECONDS)
.writeTimeout(120, TimeUnit.SECONDS)
.pingInterval(3, TimeUnit.SECONDS)
.certificatePinner(trustedCertificates(sidSignServiceUrl, certBundle))
.cache(null);
addLoggingInterceptor(httpClientBuilder, context);
Expand Down

0 comments on commit 88ffb74

Please sign in to comment.