mirror of
https://github.com/apache/jclouds.git
synced 2025-02-16 15:08:28 +00:00
Merge branch 'master' of https://github.com/mikem2005/jclouds
* 'master' of https://github.com/mikem2005/jclouds: Set connect and read timeout on connection
This commit is contained in:
commit
3602f03133
@ -172,6 +172,12 @@ public class JavaUrlHttpCommandExecutorService extends BaseHttpCommandExecutorSe
|
|||||||
if (utils.trustAllCerts())
|
if (utils.trustAllCerts())
|
||||||
sslCon.setSSLSocketFactory(untrustedSSLContextProvider.get().getSocketFactory());
|
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.setDoOutput(true);
|
||||||
connection.setAllowUserInteraction(false);
|
connection.setAllowUserInteraction(false);
|
||||||
// do not follow redirects since https redirects don't work properly
|
// do not follow redirects since https redirects don't work properly
|
||||||
|
Loading…
x
Reference in New Issue
Block a user