Skip to content

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

Open
@cliviu

Description

@cliviu

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions