Skip to content

Commit 4691583

Browse files
authoredAug 15, 2023
Merge pull request #1774 from afharo/remove-v14-destroy-before-abort-hack
fix: do not force-set `req.destroyed = true` on abort
2 parents 73c7efb + 70c464c commit 4691583

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed
 

‎src/request-base.js

-4
Original file line numberDiff line numberDiff line change
@@ -501,10 +501,6 @@ RequestBase.prototype.abort = function () {
501501
throw new Error(
502502
'Superagent does not work in v13 properly with abort() due to Node.js core changes'
503503
);
504-
} else if (semver.gte(process.version, 'v14.0.0')) {
505-
// We have to manually set `destroyed` to `true` in order for this to work
506-
// (see core internals of end-of-stream.js above in v14 branch as compared to v12)
507-
this.req.destroyed = true;
508504
}
509505

510506
this.req.abort(); // node

0 commit comments

Comments
 (0)
Please sign in to comment.