GUACAMOLE-203: Add a few more comments to code.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/75019f5e Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/75019f5e Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/75019f5e Branch: refs/heads/master Commit: 75019f5e4bd01d5889b496d847b2dd2c64d0244f Parents: 8ab7e56 Author: Nick Couchman <[email protected]> Authored: Wed May 31 08:30:56 2017 -0400 Committer: Nick Couchman <[email protected]> Committed: Wed May 31 21:02:53 2017 -0400 ---------------------------------------------------------------------- src/protocols/ssh/ssh.c | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/75019f5e/src/protocols/ssh/ssh.c ---------------------------------------------------------------------- diff --git a/src/protocols/ssh/ssh.c b/src/protocols/ssh/ssh.c index fc5e408..36055c8 100644 --- a/src/protocols/ssh/ssh.c +++ b/src/protocols/ssh/ssh.c @@ -346,10 +346,12 @@ void* ssh_client_thread(void* data) { /* Send keepalive at configured interval */ if (settings->server_alive_interval > 0) { alive = libssh2_keepalive_send(ssh_client->session->session, &timeout); + /* Sending the keepalive failed, so we break out */ if (alive > 0) break; sleep = timeout * 1000; } + /* If keepalive is not configured, sleep for the default of 1 second */ else sleep = 1000;
