From 70c464cd1b19eb5a95a5195b52b5e615746f1208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Mon, 14 Aug 2023 13:17:22 +0200 Subject: [PATCH] fix: do not force-set `req.destroyed = true` on abort --- src/request-base.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/request-base.js b/src/request-base.js index 86688c464..1053dbd44 100644 --- a/src/request-base.js +++ b/src/request-base.js @@ -501,10 +501,6 @@ RequestBase.prototype.abort = function () { throw new Error( 'Superagent does not work in v13 properly with abort() due to Node.js core changes' ); - } else if (semver.gte(process.version, 'v14.0.0')) { - // We have to manually set `destroyed` to `true` in order for this to work - // (see core internals of end-of-stream.js above in v14 branch as compared to v12) - this.req.destroyed = true; } this.req.abort(); // node