This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new cd12d67926db fix(components): ssh helper stream closure
cd12d67926db is described below
commit cd12d67926db2b9f4e9eb4251e62d887576de22a
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Tue Dec 2 11:49:05 2025 +0100
fix(components): ssh helper stream closure
---
.../src/main/java/org/apache/camel/component/ssh/SshHelper.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshHelper.java
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshHelper.java
index a343fa0c5de8..b0703f1f30bd 100644
---
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshHelper.java
+++
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshHelper.java
@@ -79,7 +79,7 @@ public final class SshHelper {
ClientChannel channel = null;
ClientSession session = null;
- try {
+ try (PipedOutputStream reply = new PipedOutputStream()) {
AuthFuture authResult;
session = connectFuture.getSession();
@@ -137,7 +137,6 @@ public final class SshHelper {
}
InputStream in = null;
- PipedOutputStream reply = new PipedOutputStream();
// for now only two channel types are supported
// shell option is added for specific purpose for now