JCLOUDS-561: Properly populate the ssh agent connection in the builder methods

This commit is contained in:
Ignasi Barrera 2014-05-07 14:58:50 +02:00
parent 24a7c4d195
commit aef9fc8d83
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ public final class SessionConnection implements Connection<Session> {
public Builder from(SessionConnection in) { public Builder from(SessionConnection in) {
return hostAndPort(in.hostAndPort).loginCredentials(in.loginCredentials).proxy(in.proxy.orNull()) 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<Connector> agentConnector) { public Builder agentConnector(Optional<Connector> agentConnector) {

View File

@ -107,7 +107,7 @@ public class SSHClientConnection implements Connection<SSHClient> {
protected Builder fromSSHClientConnection(SSHClientConnection in) { protected Builder fromSSHClientConnection(SSHClientConnection in) {
return hostAndPort(in.getHostAndPort()).connectTimeout(in.getConnectTimeout()).loginCredentials( return hostAndPort(in.getHostAndPort()).connectTimeout(in.getConnectTimeout()).loginCredentials(
in.getLoginCredentials()); in.getLoginCredentials()).sessionTimeout(in.getSessionTimeout()).agentConnector(in.getAgentConnector());
} }
} }