Skip to content

Commit e11d092

Browse files
committed
The File is an EventEmmiter, isn't it?
1 parent 543f748 commit e11d092

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/incoming_form.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,6 @@ IncomingForm.prototype.handlePart = function(part) {
207207
hash: self.hash
208208
});
209209

210-
file.on('error', function(err) {
211-
self.emit('error', err);
212-
});
213-
214210
this.emit('fileBegin', part.name, file);
215211

216212
file.open();
@@ -233,6 +229,10 @@ IncomingForm.prototype.handlePart = function(part) {
233229
self._maybeEnd();
234230
});
235231
});
232+
233+
file.on('error', function(err) {
234+
self.emit('error', err);
235+
});
236236
};
237237

238238
function dummyParser(self) {

0 commit comments

Comments
 (0)