You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/11/24 07:57:18 UTC

[camel] branch master updated: Set the FTPClient default socket timeout to allow it to set a socket timeout before starting the implicit TLS handshake which can currently hang permanently.

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

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 82d44a4  Set the FTPClient default socket timeout to allow it to set a socket timeout before starting the implicit TLS handshake which can currently hang permanently.
82d44a4 is described below

commit 82d44a49225aa644146c44c4df47bb5b25ea738f
Author: Cott Lang <co...@possiblefinance.com>
AuthorDate: Fri Nov 20 14:29:21 2020 -0800

    Set the FTPClient default socket timeout to allow it to set a socket timeout before starting the implicit TLS handshake which can currently hang permanently.
---
 .../java/org/apache/camel/component/file/remote/FtpOperations.java    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
index 1c816f1..f92a747 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
@@ -112,6 +112,10 @@ public class FtpOperations implements RemoteFileOperations<FTPFile> {
             client.configure(clientConfig);
         }
 
+        if (endpoint.getSoTimeout() > 0) {
+            client.setDefaultTimeout(endpoint.getSoTimeout());
+        }
+
         if (log.isTraceEnabled()) {
             log.trace("Connecting to {} using connection timeout: {}", configuration.remoteServerInformation(),
                     client.getConnectTimeout());