Skip to content

Commit 3c25c94

Browse files
committed
Fixes richardgirges#256. Unpipe busboy after error and skip further stream processing.
1 parent 61e6adc commit 3c25c94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/processMultipart.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ module.exports = (options, req, res, next) => {
6060

6161
const writePromise = options.useTempFiles
6262
? getWritePromise().catch(err => {
63-
uploadTimer.clear();
63+
req.unpipe(busboy);
64+
req.resume();
6465
cleanup();
6566
next(err);
6667
}) : getWritePromise();

0 commit comments

Comments
 (0)