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

main
Julian van den Berkmortel 4 years ago
parent 86f0c10004
commit 23a1d783db

@ -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);
}
} }
/** /**

Loading…
Cancel
Save