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

Best strategy to detect that the connection is down? #995

Open
cliviu opened this issue Mar 17, 2025 · 0 comments
Open

Best strategy to detect that the connection is down? #995

cliviu opened this issue Mar 17, 2025 · 0 comments

Comments

@cliviu
Copy link

cliviu commented Mar 17, 2025

Hi,

it looks like the method SSHClient.isConnected() will not detect that the server is down after an initial connection is established and afterward the server is shut down.

I have tried even to call SftpClient.ls("/") and surprisingly I get an answer even if the server is not running.

I have also set the timeout to a lower value but still no improvement 
sftpClient.getSFTPEngine().setTimeoutMs(3000);

What is the best approach to recognize when the connection is down?

Thank you!

@cliviu cliviu changed the title Best strategy to detect is the connection is down? Best strategy to detect that the connection is down? Mar 17, 2025
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

1 participant