浏览代码

Fix ConnectHttp method to exit in HttpStatusCode.OK

olegkap_cp 12 年之前
父节点
当前提交
61f3adbb8b
共有 1 个文件被更改,包括 2 次插入2 次删除
  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);