diff options
| author | Julian Andres Klode <jak@debian.org> | 2021-04-15 23:42:04 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2021-04-15 23:42:04 +0000 |
| commit | 86014d9924afa94efab09c9bd57bcf8b069ae86b (patch) | |
| tree | beab71c20e3add30f7743b51d11bbdbf8711a1af | |
| parent | 9d95c64be8dd5a74efb7bcd134f6425c837c22ca (diff) | |
| parent | 10631550f1f9788bdfd64d2434237a1448ab0626 (diff) | |
Merge branch 'pu/retry-3-times' into 'main'
Automatically retry failed downloads 3 times
See merge request apt-team/apt!164
| -rw-r--r-- | apt-pkg/acquire-item.cc | 2 | ||||
| -rwxr-xr-x | test/integration/test-proxy-connect | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 2bab7d5c0..225c4304a 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -770,7 +770,7 @@ class APT_HIDDEN CleanupItem : public pkgAcqTransactionItem /*{{{*/ // Acquire::Item::Item - Constructor /*{{{*/ pkgAcquire::Item::Item(pkgAcquire * const owner) : FileSize(0), PartialSize(0), ID(0), Complete(false), Local(false), - QueueCounter(0), ExpectedAdditionalItems(0), Retries(_config->FindI("Acquire::Retries", 0)), Owner(owner), d(new Private()) + QueueCounter(0), ExpectedAdditionalItems(0), Retries(_config->FindI("Acquire::Retries", 3)), Owner(owner), d(new Private()) { Owner->Add(this); Status = StatIdle; diff --git a/test/integration/test-proxy-connect b/test/integration/test-proxy-connect index 17927c9db..579bab387 100755 --- a/test/integration/test-proxy-connect +++ b/test/integration/test-proxy-connect @@ -19,4 +19,13 @@ echo "Acquire::http::Proxy \"http://localhost:${APTHTTPPORT}\";" > rootdir/etc/a aptget update >/dev/null 2>&1 testsuccessequal "CONNECT example.example:443 HTTP/1.1\r +Host: example.example:443\r +-- +CONNECT example.example:443 HTTP/1.1\r +Host: example.example:443\r +-- +CONNECT example.example:443 HTTP/1.1\r +Host: example.example:443\r +-- +CONNECT example.example:443 HTTP/1.1\r Host: example.example:443\r" grep -A1 "^CONNECT" aptarchive/webserver.log |
