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 2018/11/16 12:42:57 UTC
[camel] branch master updated: CAMEL-12631 - SFTP: Socket timeout
overwrites Server Alive Interval
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 16a7508 CAMEL-12631 - SFTP: Socket timeout overwrites Server Alive Interval
16a7508 is described below
commit 16a7508fdd0be0fa179204f40beb6bfdda1f0467
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Nov 16 13:30:25 2018 +0100
CAMEL-12631 - SFTP: Socket timeout overwrites Server Alive Interval
---
.../org/apache/camel/component/file/remote/SftpOperations.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
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 b912151..23abe1e 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
@@ -354,8 +354,12 @@ public class SftpOperations implements RemoteFileOperations<SftpRemoteFile> {
});
// set the SO_TIMEOUT for the time after the connect phase
- if (configuration.getSoTimeout() > 0) {
- session.setTimeout(configuration.getSoTimeout());
+ if (sftpConfig.getServerAliveInterval() == 0) {
+ if (configuration.getSoTimeout() > 0) {
+ session.setTimeout(configuration.getSoTimeout());
+ }
+ } else {
+ LOG.debug("The Server Alive Internal is already set, the socket timeout won't be considered to avoid overidding the provided Server alive interval value");
}
// set proxy if configured