undici.patch 663 B

12345678910111213
  1. diff --git a/lib/api/api-request.js b/lib/api/api-request.js
  2. index ced5590d21053ddd4c6e81e25fb1a3baea08e2c5..be17d62877403cfc8afe10a75ceb67bf1de5e56d 100644
  3. --- a/lib/api/api-request.js
  4. +++ b/lib/api/api-request.js
  5. @@ -73,7 +73,7 @@ class RequestHandler extends AsyncResource {
  6. this.removeAbortListener = util.addAbortListener(this.signal, () => {
  7. this.reason = this.signal.reason ?? new RequestAbortedError()
  8. if (this.res) {
  9. - util.destroy(this.res, this.reason)
  10. + util.destroy(this.res.on('error', util.nop), this.reason)
  11. } else if (this.abort) {
  12. this.abort(this.reason)
  13. }