Przeglądaj źródła

Fix ShellStream Expect method that causes application to hang

olegkap_cp 13 lat temu
rodzic
commit
d0241f5853
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      Renci.SshClient/Renci.SshNet/ShellStream.cs

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

@@ -320,7 +320,7 @@ namespace Renci.SshNet
         /// Text available in the shell that ends with expected text, if the specified time elapsed returns null.
         public string Expect(string text, TimeSpan timeout)
         {
-            return this.Expect(new Regex(Regex.Escape(text)));
+            return this.Expect(new Regex(Regex.Escape(text)), timeout);
         }
 
         /// <summary>