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 8d198cfa99..debfa9d54f 100644 --- a/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java +++ b/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java @@ -172,6 +172,12 @@ 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.setDoOutput(true); connection.setAllowUserInteraction(false); // do not follow redirects since https redirects don't work properly