diff --git a/gradle.properties b/gradle.properties index ca8c98d5a..ad97741fe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -appVersionCode=37 +appVersionCode=39 appVersionName=2.4.5 appAbiFilters=arm64-v8a;armeabi-v7a;x86;x86_64 diff --git a/mobile-id-lib/src/main/java/ee/ria/DigiDoc/mobileid/rest/ServiceGenerator.java b/mobile-id-lib/src/main/java/ee/ria/DigiDoc/mobileid/rest/ServiceGenerator.java index c0125d57b..34f756728 100644 --- a/mobile-id-lib/src/main/java/ee/ria/DigiDoc/mobileid/rest/ServiceGenerator.java +++ b/mobile-id-lib/src/main/java/ee/ria/DigiDoc/mobileid/rest/ServiceGenerator.java @@ -74,7 +74,10 @@ public static S createService(Class serviceClass, SSLContext sslContext, private static OkHttpClient buildHttpClient(SSLContext sslContext, String midSignServiceUrl, ArrayList 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) { diff --git a/smart-id-lib/src/main/java/ee/ria/DigiDoc/smartid/rest/ServiceGenerator.java b/smart-id-lib/src/main/java/ee/ria/DigiDoc/smartid/rest/ServiceGenerator.java index 21dd7ff59..89282e972 100644 --- a/smart-id-lib/src/main/java/ee/ria/DigiDoc/smartid/rest/ServiceGenerator.java +++ b/smart-id-lib/src/main/java/ee/ria/DigiDoc/smartid/rest/ServiceGenerator.java @@ -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);