You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2018/10/05 10:38:39 UTC

[camel] branch camel-2.22.x updated: setting default idletimeout for httpclient

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

zregvart pushed a commit to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.22.x by this push:
     new f7bf43b  setting default idletimeout for httpclient
f7bf43b is described below

commit f7bf43b76efb27c7934cdd34956448fbe4d210db
Author: Sowjanya Mudimala <sm...@tableau.com>
AuthorDate: Thu Oct 4 12:03:56 2018 -0700

    setting default idletimeout for httpclient
    
    (cherry picked from commit 138141e56ead726edb2c8cc5c03682bbed5371f6)
---
 .../org/apache/camel/component/salesforce/SalesforceComponent.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
index 7ced1a0..daa0f13 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
@@ -80,6 +80,7 @@ public class SalesforceComponent extends DefaultComponent implements VerifiableC
     public static final String HTTP_PROXY_REALM = "httpProxyRealm";
 
     static final int CONNECTION_TIMEOUT = 60000;
+    static final int IDLE_TIMEOUT = 5000;
     static final Pattern SOBJECT_NAME_PATTERN = Pattern.compile("^.*[\\?&]sObjectName=([^&,]+).*$");
     static final String APEX_CALL_PREFIX = OperationName.APEX_CALL.value() + "/";
 
@@ -116,7 +117,7 @@ public class SalesforceComponent extends DefaultComponent implements VerifiableC
         label = "common,security", secret = true)
     private String refreshToken;
 
-    @Metadata(description = "Username used in OAuth flow to gain access to access token. It's easy to get started with" 
+    @Metadata(description = "Username used in OAuth flow to gain access to access token. It's easy to get started with"
         + " password OAuth flow, but in general one should avoid it as it is deemed less secure than other flows.",
         label = "common,security")
     private String userName;
@@ -716,6 +717,7 @@ public class SalesforceComponent extends DefaultComponent implements VerifiableC
         // default settings, use httpClientProperties to set other
         // properties
         httpClient.setConnectTimeout(CONNECTION_TIMEOUT);
+        httpClient.setIdleTimeout(IDLE_TIMEOUT);
 
         return httpClient;
     }