From aef9fc8d8399483cca9a874bc60327c70cca74c4 Mon Sep 17 00:00:00 2001 From: Ignasi Barrera Date: Wed, 7 May 2014 14:58:50 +0200 Subject: [PATCH] JCLOUDS-561: Properly populate the ssh agent connection in the builder methods --- .../src/main/java/org/jclouds/ssh/jsch/SessionConnection.java | 2 +- .../src/main/java/org/jclouds/sshj/SSHClientConnection.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/SessionConnection.java b/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/SessionConnection.java index f6465cb490..f15fc8f7ae 100644 --- a/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/SessionConnection.java +++ b/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/SessionConnection.java @@ -124,7 +124,7 @@ public final class SessionConnection implements Connection { public Builder from(SessionConnection in) { return hostAndPort(in.hostAndPort).loginCredentials(in.loginCredentials).proxy(in.proxy.orNull()) - .connectTimeout(in.connectTimeout).sessionTimeout(in.sessionTimeout); + .connectTimeout(in.connectTimeout).sessionTimeout(in.sessionTimeout).agentConnector(in.agentConnector); } public Builder agentConnector(Optional agentConnector) { diff --git a/drivers/sshj/src/main/java/org/jclouds/sshj/SSHClientConnection.java b/drivers/sshj/src/main/java/org/jclouds/sshj/SSHClientConnection.java index f1f32e2efb..1e7a42bd99 100644 --- a/drivers/sshj/src/main/java/org/jclouds/sshj/SSHClientConnection.java +++ b/drivers/sshj/src/main/java/org/jclouds/sshj/SSHClientConnection.java @@ -107,7 +107,7 @@ public class SSHClientConnection implements Connection { protected Builder fromSSHClientConnection(SSHClientConnection in) { return hostAndPort(in.getHostAndPort()).connectTimeout(in.getConnectTimeout()).loginCredentials( - in.getLoginCredentials()); + in.getLoginCredentials()).sessionTimeout(in.getSessionTimeout()).agentConnector(in.getAgentConnector()); } }