Permalink
Browse files

Fixed a bug introduced when adding `defer` option to multipart() midd…

…leware
  • Loading branch information...
1 parent 7626549 commit 9f7427a99132bab274995dade5afc610d00dc5ab @bminer bminer committed Oct 2, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/middleware/multipart.js
@@ -101,13 +101,13 @@ exports = module.exports = function(options){
ondata(name, val, files);
});
- if(!options.defer) {
- form.on('error', function(err){
+ form.on('error', function(err){
+ if(!options.defer) {
err.status = 400;
next(err);
- done = true;
- });
- }
+ }
+ done = true;
+ });
form.on('end', function(){
if (done) return;

0 comments on commit 9f7427a

Please sign in to comment.