Skip to content

Commit

Permalink
Keeping a static reference to the SSHJ config, fixes #76
Browse files Browse the repository at this point in the history
  • Loading branch information
hierynomus committed May 17, 2013
1 parent 712e7c3 commit 59abd40
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/com/xebialabs/overthere/ssh/SshConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
import java.util.regex.Pattern;

import com.google.common.io.Closeables;

import net.schmizz.sshj.Config;
import net.schmizz.sshj.DefaultConfig;
import net.schmizz.sshj.SSHClient;
import net.schmizz.sshj.common.Factory;
import net.schmizz.sshj.common.SSHException;
Expand Down Expand Up @@ -102,10 +105,13 @@ abstract class SshConnection extends BaseOverthereConnection {

private static final Pattern ptyPattern = Pattern.compile(PTY_PATTERN);

private static final Config config = new DefaultConfig();


@VisibleForTesting protected Factory<SSHClient> sshClientFactory = new Factory<SSHClient>() {
@Override
public SSHClient create() {
return new SSHClient();
return new SSHClient(config);
}
};

Expand Down

0 comments on commit 59abd40

Please sign in to comment.