Skip to content

Commit

Permalink
try fixing the error
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Feb 7, 2024
1 parent 3eeb151 commit 3d9c90c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,13 @@ function fastifyMultipart (fastify, options, done) {
function onEnd (err) {
cleanup(err)

ch(err || lastError)
ch(null)
}

function cleanup (err) {
request.unpipe(bb)

if (err && currentFile) {
if ((err || request.aborted) && currentFile) {
currentFile.destroy()
}

Expand Down

0 comments on commit 3d9c90c

Please sign in to comment.