diff --git a/Renci.SshClient/Renci.SshNet/Netconf/NetConfSession.cs b/Renci.SshClient/Renci.SshNet/Netconf/NetConfSession.cs index 39efc37f..e2c1a496 100644 --- a/Renci.SshClient/Renci.SshNet/Netconf/NetConfSession.cs +++ b/Renci.SshClient/Renci.SshNet/Netconf/NetConfSession.cs @@ -23,7 +23,7 @@ namespace Renci.SshNet.NetConf private const string _prompt = "]]>]]>"; - private List _data = new List(32 * 1024); + private List _data = new List(16 * 1024); private EventWaitHandle _serverCapabilitiesConfirmed = new AutoResetEvent(false); diff --git a/Renci.SshClient/Renci.SshNet/ScpClient.cs b/Renci.SshClient/Renci.SshNet/ScpClient.cs index 65715fe0..813e216c 100644 --- a/Renci.SshClient/Renci.SshNet/ScpClient.cs +++ b/Renci.SshClient/Renci.SshNet/ScpClient.cs @@ -61,7 +61,7 @@ namespace Renci.SshNet : base(connectionInfo) { this.OperationTimeout = new TimeSpan(0, 0, 0, 0, -1); - this.BufferSize = 1024 * 32 - 52; + this.BufferSize = 1024 * 16; if (_byteToChar == null) { diff --git a/Renci.SshClient/Renci.SshNet/Sftp/SftpSession.cs b/Renci.SshClient/Renci.SshNet/Sftp/SftpSession.cs index 52b33125..b533131a 100644 --- a/Renci.SshClient/Renci.SshNet/Sftp/SftpSession.cs +++ b/Renci.SshClient/Renci.SshNet/Sftp/SftpSession.cs @@ -17,7 +17,7 @@ namespace Renci.SshNet.Sftp { private Dictionary _requests = new Dictionary(); - private List _data = new List(32 * 1024); + private List _data = new List(16 * 1024); private EventWaitHandle _sftpVersionConfirmed = new AutoResetEvent(false); @@ -385,7 +385,7 @@ namespace Renci.SshNet.Sftp /// The wait event handle if needed. internal void RequestWrite(byte[] handle, UInt64 offset, byte[] data, EventWaitHandle wait) { - var maximumDataSize = 1024 * 32 - 52; + var maximumDataSize = 1024 * 16; if (data.Length < maximumDataSize + 1) { diff --git a/Renci.SshClient/Renci.SshNet/SftpClient.cs b/Renci.SshClient/Renci.SshNet/SftpClient.cs index 511612e4..615f8286 100644 --- a/Renci.SshClient/Renci.SshNet/SftpClient.cs +++ b/Renci.SshClient/Renci.SshNet/SftpClient.cs @@ -64,7 +64,7 @@ namespace Renci.SshNet : base(connectionInfo) { this.OperationTimeout = new TimeSpan(0, 0, 0, 0, -1); - this.BufferSize = 1024 * 32 - 52; + this.BufferSize = 1024 * 16; } ///