aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hood <jhood@niksun.com>2022-04-21 21:39:14 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2022-10-12 09:01:56 +0000
commit3cb757615f26c5a486b9dde1ba5c3df478ccfe60 (patch)
tree54f6e5c879310eb584079b0441ac6ba1b87ef9bc
parent3b1354554084f89261f5c099cb24794c032e44b3 (diff)
downloadsrc-3cb757615f26c5a486b9dde1ba5c3df478ccfe60.tar.gz
src-3cb757615f26c5a486b9dde1ba5c3df478ccfe60.zip
/usr/sbin/pkg: don't sleep on fetch failure
PR: 263458 (cherry picked from commit 60b92ba9323c2dd249ba3a3349b207c2d0b9d212)
-rw-r--r--usr.sbin/pkg/pkg.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c
index 7c5e6ebc6e9c..f3c338c6961e 100644
--- a/usr.sbin/pkg/pkg.c
+++ b/usr.sbin/pkg/pkg.c
@@ -236,9 +236,7 @@ fetch_to_fd(const char *url, char *path, const char *fetchOpts)
--retry;
if (retry <= 0)
goto fetchfail;
- if (mirrors == NULL) {
- sleep(1);
- } else {
+ if (mirrors != NULL) {
current = current->next;
if (current == NULL)
current = mirrors;