hierynomus / hierynomus/sshj

Best strategy to detect that the connection is down?

Open
#995 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.7k
Forks
620
Avg merge
3d 23h
Merged PRs (30d)
11

Description

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!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.