BlockedIPs: reject job like other exceptions (#11992)
parent
f83b6b1026
commit
f38df849c2
|
@ -492,7 +492,7 @@ class CurlDownloader
|
||||||
is_callable($this->jobs[$i]['options']['prevent_ip_access_callable']) &&
|
is_callable($this->jobs[$i]['options']['prevent_ip_access_callable']) &&
|
||||||
$this->jobs[$i]['options']['prevent_ip_access_callable']($progress['primary_ip'])
|
$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'];
|
$this->jobs[$i]['primaryIp'] = (string) $progress['primary_ip'];
|
||||||
|
|
Loading…
Reference in New Issue