Change methods to use the Session.Infinite value rather than -1 or their own Infinite value

This commit is contained in:
Matthew Vukomanovic
2016-06-14 13:16:27 +08:00
parent 2fd25cb2cb
commit d755829ee0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -464,7 +464,7 @@ namespace Renci.SshNet
/// </returns>
public string Expect(string text)
{
return Expect(new Regex(Regex.Escape(text)), TimeSpan.FromMilliseconds(-1));
return Expect(new Regex(Regex.Escape(text)), Session.InfiniteTimeSpan);
}
/// <summary>
+1 -1
View File
@@ -143,7 +143,7 @@ namespace Renci.SshNet
_session = session;
CommandText = commandText;
_encoding = encoding;
CommandTimeout = SshNet.Session.InfiniteTimeSpan;
CommandTimeout = Session.InfiniteTimeSpan;
_sessionErrorOccuredWaitHandle = new AutoResetEvent(false);
_session.Disconnected += Session_Disconnected;