Explorar o código

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

Matthew Vukomanovic %!s(int64=9) %!d(string=hai) anos
pai
achega
d755829ee0
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      src/Renci.SshNet/ShellStream.cs
  2. 1 1
      src/Renci.SshNet/SshCommand.cs

+ 1 - 1
src/Renci.SshNet/ShellStream.cs

@@ -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
src/Renci.SshNet/SshCommand.cs

@@ -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;