diff --git a/src/Renci.SshNet/ShellStream.cs b/src/Renci.SshNet/ShellStream.cs index 547518b6b..3274fe19c 100644 --- a/src/Renci.SshNet/ShellStream.cs +++ b/src/Renci.SshNet/ShellStream.cs @@ -16,7 +16,6 @@ namespace Renci.SshNet public class ShellStream : Stream { private const string CrLf = "\r\n"; - private const string Cr = "\n"; private readonly ISession _session; private readonly Encoding _encoding; @@ -621,14 +620,14 @@ public string ReadLine(TimeSpan timeout) text = _encoding.GetString(_incoming.ToArray(), 0, _incoming.Count); } - var index = text.IndexOf(Cr, StringComparison.Ordinal); + var index = text.IndexOf(CrLf, StringComparison.Ordinal); if (index >= 0) { text = text.Substring(0, index); // determine how many bytes to remove from buffer - var bytesProcessed = _encoding.GetByteCount(text + Cr); + var bytesProcessed = _encoding.GetByteCount(text + CrLf); // remove processed bytes from the queue for (var i = 0; i < bytesProcessed; i++)