Skip to content

Commit d755829

Browse files
Change methods to use the Session.Infinite value rather than -1 or their own Infinite value
1 parent 2fd25cb commit d755829

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Renci.SshNet/ShellStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ public string EndExpect(IAsyncResult asyncResult)
464464
/// </returns>
465465
public string Expect(string text)
466466
{
467-
return Expect(new Regex(Regex.Escape(text)), TimeSpan.FromMilliseconds(-1));
467+
return Expect(new Regex(Regex.Escape(text)), Session.InfiniteTimeSpan);
468468
}
469469

470470
/// <summary>

src/Renci.SshNet/SshCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ internal SshCommand(ISession session, string commandText, Encoding encoding)
143143
_session = session;
144144
CommandText = commandText;
145145
_encoding = encoding;
146-
CommandTimeout = SshNet.Session.InfiniteTimeSpan;
146+
CommandTimeout = Session.InfiniteTimeSpan;
147147
_sessionErrorOccuredWaitHandle = new AutoResetEvent(false);
148148

149149
_session.Disconnected += Session_Disconnected;

0 commit comments

Comments
 (0)