Repository: camel Updated Branches: refs/heads/camel-2.15.x f3a258398 -> bccf39ce7
[CAMEL-8718] Do not disconnect if connected & logged in (cherry picked from commit 5553474960c83ed8828ed252031818c050a6436f) Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bccf39ce Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bccf39ce Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bccf39ce Branch: refs/heads/camel-2.15.x Commit: bccf39ce75a78772aec944b2ec2c9c27809d09b0 Parents: 7c51a07 Author: Grzegorz Grzybek <[email protected]> Authored: Wed Apr 29 12:22:58 2015 +0200 Committer: Grzegorz Grzybek <[email protected]> Committed: Wed Apr 29 13:13:33 2015 +0200 ---------------------------------------------------------------------- .../org/apache/camel/component/file/remote/RemoteFileConsumer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/bccf39ce/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java ---------------------------------------------------------------------- diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java index ad27000..bf28f14 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java @@ -198,7 +198,7 @@ public abstract class RemoteFileConsumer<T> extends GenericFileConsumer<T> { try { // we may as well be connected, but not logged in. let's disconnect to prevent connection leak - if (getOperations().isConnected()) { + if (!isConnected && getOperations().isConnected()) { getOperations().disconnect(); } } catch (Exception ex) {
