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

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

@ -268,10 +268,14 @@ class HttpDownloader
return; return;
} }
if ($job['request']['copyTo']) { try {
$job['curl_id'] = $this->curl->download($resolve, $reject, $origin, $url, $options, $job['request']['copyTo']); if ($job['request']['copyTo']) {
} else { $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); } else {
$job['curl_id'] = $this->curl->download($resolve, $reject, $origin, $url, $options);
}
} catch (\Exception $exception) {
$reject($exception);
} }
} }

Loading…
Cancel
Save