mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-11 13:39:09 +00:00
71664e2c935c66cfb277a741df91a9dfcd92575e
* Only send SSH_MSG_CHANNEL_EOF message to remote party when we haven't received a SSH_MSG_CHANNEL_EOF or SSH_MSG_CHANNEL_CLOSE message from the remote party. * Move logic for sending SSH_MSG_CHANNEL_EOF message from derived classes and client classes into Channel.Close(bool) method. * Move initialization to ctor. ChannelSession: * Avoid leaking session semaphores. SftpFileStream: * Modify CanRead, CanWrite and CanSeek to return false when the stream is disposed. * Modify other public members to throw ObjectDisposedException when the stream is disposed or the SFTP session is no longer open. * Modify Dispose to only flush the write buffer and/or close the SFTP file handle when the SFTP session is open. * No longer flush write buffer or close SFTP file handle in finalizer. Fixes issue #2013. Session: * Remove CreateClientChannel<T> and CreateServerChannel<T> methods; use specific constructors of channels instead. SftpClient: * BufferSize was not used for AppendText(String, Encoding) and Create(String) overloads. SubsystemSession: * Added IsOpen property. * Throw ObjectDisposedException in all public members - except for IsOpen - when the session is disposed. * Throw InvalidOperationException in all public members - except for Connect and IsOpen - when the session is not open. * Modify Disconnect to release managed resources that are linked to the connected session. * Modify Dispose to use Disconnect to managed resources that are linked to the connected session. Unit tests: * Added large set of tests for changes listed above. * Tests for which the code was automatically, and that are not yet correctly implemented, are now marked as Ignore. * Tests that require a (specifically configured) running SSH server are now marked with test category "integration".
Languages
C#
99.9%