1
0
Fork 0

Reject job within "HttpDownloader" when an exception is thrown, refs #9424

pull/9442/head
Julian van den Berkmortel 2020-11-08 21:53:03 +01:00
parent 86f0c10004
commit 23a1d783db
1 changed files with 8 additions and 4 deletions

View File

@ -268,11 +268,15 @@ class HttpDownloader
return; return;
} }
try {
if ($job['request']['copyTo']) { if ($job['request']['copyTo']) {
$job['curl_id'] = $this->curl->download($resolve, $reject, $origin, $url, $options, $job['request']['copyTo']); $job['curl_id'] = $this->curl->download($resolve, $reject, $origin, $url, $options, $job['request']['copyTo']);
} else { } else {
$job['curl_id'] = $this->curl->download($resolve, $reject, $origin, $url, $options); $job['curl_id'] = $this->curl->download($resolve, $reject, $origin, $url, $options);
} }
} catch (\Exception $exception) {
$reject($exception);
}
} }
/** /**