Updated Branches:
  refs/heads/master 1706dca42 -> 28807d49f

[SSHD-274] SshClient: Sample code in JavaDoc is outdated

Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/28807d49
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/28807d49
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/28807d49

Branch: refs/heads/master
Commit: 28807d49f2f2501cec46302835539268562c22f6
Parents: 1706dca
Author: Guillaume Nodet <[email protected]>
Authored: Fri Jan 24 09:00:26 2014 +0100
Committer: Guillaume Nodet <[email protected]>
Committed: Fri Jan 24 09:00:26 2014 +0100

----------------------------------------------------------------------
 sshd-core/src/main/java/org/apache/sshd/SshClient.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/28807d49/sshd-core/src/main/java/org/apache/sshd/SshClient.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/SshClient.java 
b/sshd-core/src/main/java/org/apache/sshd/SshClient.java
index 28ac5fa..8762021 100644
--- a/sshd-core/src/main/java/org/apache/sshd/SshClient.java
+++ b/sshd-core/src/main/java/org/apache/sshd/SshClient.java
@@ -111,7 +111,7 @@ import org.apache.sshd.common.util.SecurityUtils;
  *    SshClient client = SshClient.setUpDefaultClient();
  *    client.start();
  *    try {
- *        ClientSession session = client.connect(host, port);
+ *        ClientSession session = client.connect(host, 
port).await().getSession();
  *
  *        int ret = ClientSession.WAIT_AUTH;
  *        while ((ret & ClientSession.WAIT_AUTH) != 0) {
@@ -131,7 +131,7 @@ import org.apache.sshd.common.util.SecurityUtils;
  *        channel.setErr(new NoCloseOutputStream(System.err));
  *        channel.open();
  *        channel.waitFor(ClientChannel.CLOSED, 0);
- *        session.close();
+ *        session.close(false);
  *    } finally {
  *        client.stop();
  *    }

Reply via email to