From 2b6a6eed7544bfb39aa0c1a8fb8fd94b4e17c947 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Wed, 13 Aug 2025 14:19:15 +0200 Subject: improve 8b65a2b2426fd04d46c943c76af40347a611bcee, only sleep if there are no active handles --- it_url.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'it_url.class') 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 } -- cgit v1.2.3