From 63efc01c84a5f559858d0d46cb7c5a2212486567 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 28 Dec 2013 17:06:38 +0100 Subject: [PATCH] pakfire: Prevent an infinite loop with empty server list. --- src/pakfire/lib/functions.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index 133b4950f4..d14e0314da 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -305,7 +305,12 @@ sub selectmirror { } } logger("MIRROR INFO: $scount servers found in list"); - + + if ($scount eq 0) { + logger("MIRROR INFO: Could not find any servers. Falling back to main server $Conf::mainserver"); + return ("HTTP", $Conf::mainserver, "/$Conf::version"); + } + ### Choose a random server and test if it is online # If the check fails try a new server. # This will never give up. -- 2.39.5