Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeepAlive example incorrect #784

Closed
zman0900 opened this issue May 3, 2022 · 2 comments
Closed

KeepAlive example incorrect #784

zman0900 opened this issue May 3, 2022 · 2 comments

Comments

@zman0900
Copy link

zman0900 commented May 3, 2022

It seems #752 was a breaking change for how KeepAlive must be enabled. Previously, KeepAlive::setKeepAliveInterval would actually start the KeepAlive thread, so it could be (or had to be?) called after calling SSHClient::connect. Now, it appears the thread is only started from SSHClient::onConnect, which is called during SSHClient::connect. So if the keep alive interval is not pre-set before calling connect, the thread never starts.

The net.schmizz.sshj.examples.KeepAlive class should be changed to show setting the interval before connecting.

@jkosternl
Copy link

@zman0900 , please close this issue, as the PR is merged, which fixes the issue. Thanks!

@hierynomus
Copy link
Owner

I'll close the issue indeed as the examples have been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants