You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2019/10/23 09:45:44 UTC

[jclouds] branch 2.2.x updated: Fix infinite socket timeout when using ApacheHCHttpCommandExecutorServiceModule (#51)

This is an automated email from the ASF dual-hosted git repository.

nacx pushed a commit to branch 2.2.x
in repository https://gitbox.apache.org/repos/asf/jclouds.git


The following commit(s) were added to refs/heads/2.2.x by this push:
     new b6534ed  Fix infinite socket timeout when using ApacheHCHttpCommandExecutorServiceModule (#51)
b6534ed is described below

commit b6534eddde21a35faf1dbb7425297613386710ee
Author: Xavier BOURGOUIN <56...@users.noreply.github.com>
AuthorDate: Wed Oct 23 11:44:58 2019 +0200

    Fix infinite socket timeout when using ApacheHCHttpCommandExecutorServiceModule (#51)
    
    Because the Java type BasicHttpParams wasn't matching the one returned
    by provider "newBasicHttpParams" (which is returning a HttpParams type), it was configuring the Apache HTTP client with default settings (including connection and socket timeout), ignoring the ones of JClouds which were must safer in this regard (JCloudsones are currently 60sec for both, while Apache HC ones are -1, so infinite). It also prevented to override those default/infinite timeout settings with JClouds ones.
---
 .../http/apachehc/config/ApacheHCHttpCommandExecutorServiceModule.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/apachehc/src/main/java/org/jclouds/http/apachehc/config/ApacheHCHttpCommandExecutorServiceModule.java b/drivers/apachehc/src/main/java/org/jclouds/http/apachehc/config/ApacheHCHttpCommandExecutorServiceModule.java
index 00f23f4..0227074 100644
--- a/drivers/apachehc/src/main/java/org/jclouds/http/apachehc/config/ApacheHCHttpCommandExecutorServiceModule.java
+++ b/drivers/apachehc/src/main/java/org/jclouds/http/apachehc/config/ApacheHCHttpCommandExecutorServiceModule.java
@@ -143,7 +143,7 @@ public class ApacheHCHttpCommandExecutorServiceModule extends AbstractModule {
 
    @Provides
    @Singleton
-   final HttpClient newDefaultHttpClient(ProxyConfig config, BasicHttpParams params, ClientConnectionManager cm) {
+   final HttpClient newDefaultHttpClient(ProxyConfig config, HttpParams params, ClientConnectionManager cm) {
       DefaultHttpClient client = new DefaultHttpClient(cm, params);
       if (config.useSystem()) {
          ProxySelectorRoutePlanner routePlanner = new ProxySelectorRoutePlanner(client.getConnectionManager()