summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Gass2025-08-13 14:19:15 +0200
committerChristian Schneider2025-08-13 14:21:08 +0200
commit2b6a6eed7544bfb39aa0c1a8fb8fd94b4e17c947 (patch)
tree11413c7f062625e6e35b67f2e12cbd28e190b2bb
parentb3e5013602b5d8e25952115952fae11dd16f2f31 (diff)
downloaditools-2b6a6eed7544bfb39aa0c1a8fb8fd94b4e17c947.tar.gz
itools-2b6a6eed7544bfb39aa0c1a8fb8fd94b4e17c947.tar.bz2
itools-2b6a6eed7544bfb39aa0c1a8fb8fd94b4e17c947.zip
improve 8b65a2b2426fd04d46c943c76af40347a611bcee, only sleep if there are no active handles
-rw-r--r--it_url.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it_url.class b/it_url.class
index 40f22f9..ea2771c 100644
--- a/it_url.class
+++ b/it_url.class
@@ -529,9 +529,9 @@ static function get_multi($p=null)
$addhandle($key, $urls[$key]);
unset($sleepuntils[$key]);
}
- $active = 1;
}
- usleep($sleepuntils ? 100000 : 0);
+ if ($sleepuntils && !count($handles))
+ usleep(100000);
$timeout = 0.1; # Longer delay to avoid busy loop but shorter than default of 1s in case we stil hit cURL 7.25.0 problem
}