If the server closes the SFTP session but keeps the TCP connection open, this currently causes IsConnected to return true, but any operation fails with "the session is not open".
SftpClient.IsConnected now also check sftpSession.IsOpen. Connect() and ConnectAsync() were reworked to take into account that the Session may already/still be open, but the SFTP session may not. This is needed so a reconnect works.
If the server closes the SFTP session but keeps the TCP connection open, this currently causes IsConnected to return true, but any operation fails with "the session is not open".
SftpClient.IsConnected now also check sftpSession.IsOpen. Connect() and ConnectAsync() were reworked to take into account that the Session may already/still be open, but the SFTP session may not. This is needed so a reconnect works.
fixes #843 fixes #1153 fixes #369