diff --git a/src/main/java/com/crowdin/cli/client/Clients.java b/src/main/java/com/crowdin/cli/client/Clients.java index 73595db0..2073ee95 100644 --- a/src/main/java/com/crowdin/cli/client/Clients.java +++ b/src/main/java/com/crowdin/cli/client/Clients.java @@ -11,6 +11,8 @@ public final class Clients { + private static final int TIMEOUT = 30 * 60 * 1000; //30 minĖš + private Clients() {} public static NoClient noClient() { @@ -65,7 +67,7 @@ public static ProjectClient getProjectClient(String apiToken, String baseUrl, lo return new CrowdinProjectClient(client, projectId); } - public static com.crowdin.client.Client prepareClient(String apiToken, String baseUrl) { + private static com.crowdin.client.Client prepareClient(String apiToken, String baseUrl) { boolean isTesting = PropertiesBeanUtils.isUrlForTesting(baseUrl); String organization = PropertiesBeanUtils.getOrganization(baseUrl); Credentials credentials = (isTesting) @@ -74,6 +76,7 @@ public static com.crowdin.client.Client prepareClient(String apiToken, String ba ClientConfig clientConfig = ClientConfig.builder() .jsonTransformer(new JacksonJsonTransformer()) .userAgent(Utils.buildUserAgent()) + .httpTimeoutMs(TIMEOUT) .build(); Utils.proxyHost() .map(pair -> new ClientConfig.Host(pair.getKey(), pair.getValue())) diff --git a/versions.properties b/versions.properties index ec0b3de4..f73b3db9 100644 --- a/versions.properties +++ b/versions.properties @@ -43,7 +43,7 @@ version.commons-io..commons-io=2.14.0 version.commons-cli..commons-cli=1.5.0 -version.com.github.crowdin..crowdin-api-client-java=1.15.0 +version.com.github.crowdin..crowdin-api-client-java=1.15.1 plugin.org.asciidoctor.jvm.convert=3.3.2