You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/05/13 11:58:42 UTC

[3/3] camel git commit: CAMEL-8757: SFTP should use soTimeout on session as that is what it is. Thanks to Stephan Siano for the patch.

CAMEL-8757: SFTP should use soTimeout on session as that is what it is. Thanks to Stephan Siano for the patch.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/38621ea1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/38621ea1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/38621ea1

Branch: refs/heads/camel-2.14.x
Commit: 38621ea1863c513a61745bdff3f559292a6bf1a1
Parents: 483e25c
Author: Claus Ibsen <da...@apache.org>
Authored: Wed May 13 11:28:58 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed May 13 12:02:42 2015 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/file/remote/SftpOperations.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/38621ea1/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
index 2847e35..d801b68 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
@@ -316,6 +316,11 @@ public class SftpOperations implements RemoteFileOperations<ChannelSftp.LsEntry>
             }
 
         });
+
+        // set the SO_TIMEOUT for the time after the connect phase
+        if (configuration.getSoTimeout() > 0) {
+            session.setTimeout(configuration.getSoTimeout());
+        }
         
         // set proxy if configured
         if (proxy != null) {