scripts/download.pl: fix mirrors regression for curl and wget
[openwrt/staging/stintel.git] / scripts / download.pl
index 50dca2335ea2fc99ceb9eb55cb81823bc990281d..51a816cff440cf9369de34539dba1072f0111cb1 100755 (executable)
@@ -93,6 +93,7 @@ sub download_cmd {
        }
 
        if ($have_aria2c) {
+               @mirrors=();
                return join(" ", "touch /dev/shm/${rfn}_spp;",
                        qw(aria2c --stderr -c -x2 -s10 -j10 -k1M), $url, $additional_mirrors,
                        $check_certificate ? () : '--check-certificate=false',
@@ -321,7 +322,6 @@ while (!-f "$target/$filename") {
        if (!-f "$target/$filename" && $url_filename ne $filename) {
                download($mirror, $filename, @mirrors);
        }
-       @mirrors=();
 }
 
 $SIG{INT} = \&cleanup;