I'm experiencing timeout exception on Disconnect method of the SftpClient connected to an OpenSSH server.
I've figured out that the server initiates shutdown of the subsystem (sftp-sever) on client's EOF message sending EOF and CLOSE in response right away.
However, if the client's EOF message is immediately followed by CLOSE one which is the case in SSH.NET, the timing issue may occur because of the race condition when the channel is being closed before the server actually sends its EOF and CLOSE messages already issued.
Since EOF message is optional, a workaround could be simple - not to send it at all.
Comments: ** Comment from web user: drieseng **
I've figured out that the server initiates shutdown of the subsystem (sftp-sever) on client's EOF message sending EOF and CLOSE in response right away.
However, if the client's EOF message is immediately followed by CLOSE one which is the case in SSH.NET, the timing issue may occur because of the race condition when the channel is being closed before the server actually sends its EOF and CLOSE messages already issued.
Since EOF message is optional, a workaround could be simple - not to send it at all.
Comments: ** Comment from web user: drieseng **
This should no longer happen in the next beta.
Please reopen this issue (or open a new issue) if you should still run into this issue.
Thanks!