Skip to content

Commit

Permalink
Fix out-of-band error event from busboy
Browse files Browse the repository at this point in the history
  • Loading branch information
max-mathieu committed Jan 14, 2023
1 parent ddb65bd commit f8f12ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/make-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ function makeMiddleware (setup) {
if (isDone) return
isDone = true
req.unpipe(busboy)
busboy.removeAllListeners()
process.nextTick(() => {
busboy.removeAllListeners()
})
next(err)
}

Expand Down

0 comments on commit f8f12ab

Please sign in to comment.