diff --git a/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java b/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java index 50ef222bad..1fec2a79c8 100644 --- a/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java +++ b/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java @@ -185,12 +185,8 @@ public class JavaUrlHttpCommandExecutorService extends BaseHttpCommandExecutorSe if (utils.trustAllCerts()) sslCon.setSSLSocketFactory(untrustedSSLContextProvider.get().getSocketFactory()); } - if (utils.getConnectionTimeout() > 0) { - connection.setConnectTimeout(utils.getConnectionTimeout()); - } - if (utils.getSocketOpenTimeout() > 0) { - connection.setReadTimeout(utils.getSocketOpenTimeout()); - } + connection.setConnectTimeout(utils.getConnectionTimeout()); + connection.setReadTimeout(utils.getSocketOpenTimeout()); connection.setDoOutput(true); connection.setAllowUserInteraction(false); // do not follow redirects since https redirects don't work properly