Ver código fonte

Fix ConnectHttp method to exit in HttpStatusCode.OK

olegkap_cp 12 anos atrás
pai
commit
61f3adbb8b
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      Renci.SshClient/Renci.SshNet/Session.cs

+ 2 - 2
Renci.SshClient/Renci.SshNet/Session.cs

@@ -1842,11 +1842,11 @@ namespace Renci.SshNet
 
             this.SocketWrite(encoding.GetBytes("\r\n"));
 
-            HttpStatusCode statusCode = HttpStatusCode.OK;
+            HttpStatusCode statusCode = (HttpStatusCode)0;
             var response = string.Empty;
             var contentLength = 0;
 
-            while (true)
+            while (statusCode != HttpStatusCode.OK)
             {
                 this.SocketReadLine(ref response);