2
0
Эх сурвалжийг харах

Fix ConnectHttp method to exit in HttpStatusCode.OK

olegkap_cp 12 жил өмнө
parent
commit
61f3adbb8b

+ 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);