소스 검색

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