ssh2 icon indicating copy to clipboard operation
ssh2 copied to clipboard

How to tell if a client is disconnected?

Open skleeschulte opened this issue 10 years ago • 3 comments

How can I tell if a client is disconnected (because end() was called or because the connection was dropped by the server or was lost for some other reason)?

skleeschulte avatar Jun 10 '15 13:06 skleeschulte

The end/close event should be emitted.

mscdex avatar Jun 10 '15 15:06 mscdex

But is there a way to get the current state of the client? Something like sshClient.isConnected()?

skleeschulte avatar Jun 10 '15 17:06 skleeschulte

There is currently no public way to get at the current state.

mscdex avatar Jul 20 '15 15:07 mscdex