]> git.saurik.com Git - apt.git/blobdiff - methods/http.cc
Updated Swedish translation to 536t.
[apt.git] / methods / http.cc
index 506e66faefe74c65e3fa251a2f3bfa653d17d753..d4e231fbe59ba618a81c3c5521c264a346f58f8c 100644 (file)
@@ -1164,8 +1164,24 @@ int HttpMethod::Loop()
               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;
         }