From f38df849c24643fd2efbe960f4fa50e815cf7737 Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 29 May 2024 12:00:27 +0100 Subject: [PATCH] BlockedIPs: reject job like other exceptions (#11992) --- src/Composer/Util/Http/CurlDownloader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/Http/CurlDownloader.php b/src/Composer/Util/Http/CurlDownloader.php index d3e68f838..33753dba9 100644 --- a/src/Composer/Util/Http/CurlDownloader.php +++ b/src/Composer/Util/Http/CurlDownloader.php @@ -492,7 +492,7 @@ class CurlDownloader is_callable($this->jobs[$i]['options']['prevent_ip_access_callable']) && $this->jobs[$i]['options']['prevent_ip_access_callable']($progress['primary_ip']) ) { - throw new TransportException(sprintf('IP "%s" is blocked for "%s".', $progress['primary_ip'], $progress['url'])); + $this->rejectJob($this->jobs[$i], new TransportException(sprintf('IP "%s" is blocked for "%s".', $progress['primary_ip'], $progress['url']))); } $this->jobs[$i]['primaryIp'] = (string) $progress['primary_ip'];