Skip to content

Commit fc66b9b

Browse files
committed
Reject status.aborted
1 parent 86e4400 commit fc66b9b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

libs/taskNew.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ module.exports = {
455455
const body = fileNames.map(f => { return { name: 'images', file: path.join(tmpPath, f) } });
456456

457457
const curl = curlInstance(done, async (err) => {
458-
if (status.aborted) return; // Ignore if this was aborted by other code
458+
if (status.aborted) return reject(new Error("status.aborted")); // Ignore if this was aborted by other code
459459

460460
if (retries < MAX_RETRIES){
461461
retries++;
@@ -531,6 +531,7 @@ module.exports = {
531531
if (!autoscale) node.decTransients();
532532
}catch(e){
533533
if (!autoscale) node.decTransients();
534+
if (e.message === "status.aborted") return;
534535

535536
// Attempt to retry
536537
if (retries < MAX_UPLOAD_RETRIES){

0 commit comments

Comments
 (0)