]> git.saurik.com Git - apt.git/blobdiff - methods/http.cc
* Fix pipeline handling on http.cc (closes: #413324)
[apt.git] / methods / http.cc
index 506e66faefe74c65e3fa251a2f3bfa653d17d753..068d26978186b06e35a1173775ddda2d6c3722d9 100644 (file)
@@ -1164,8 +1164,25 @@ int HttpMethod::Loop()
               URIDone(Res);
            }
            else
               URIDone(Res);
            }
            else
-              Fail(true);
+               {
+                 if (Server->ServerFd == -1)
+                 {
+                         FailCounter++;
+                         _error->Discard();
+                         Server->Close();
            
            
+                         if (FailCounter >= 2)
+                         {
+                                 Fail(_("Connection failed"),true);
+                                 FailCounter = 0;
+                         }
+           
+                         QueueBack = Queue;
+                 }
+                 else
+                         Fail(true);
+               }
+
            break;
         }
         
            break;
         }