Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Jun 25, 2024
1 parent 68320ff commit 107f463
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/api/api-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ class RequestHandler extends AsyncResource {

if (body) {
this.body = null
util.destroy(body, err)

if (util.isStream(body)) {
body.on('error', () => {})
util.destroy(body, err)
}
}

if (this.removeAbortListener) {
Expand Down

0 comments on commit 107f463

Please sign in to comment.