mscdex / connect-busboy

Connect middleware for busboy
MIT License
155 stars 25 forks source link

Application freezes when no or not all files are uploaded #14

Closed kuba12kozak closed 9 years ago

kuba12kozak commented 9 years ago

Hi. I've got the following problem: http://stackoverflow.com/questions/33712020/my-application-using-busboy-freezes-when-no-files-uploaded When uploading three files everything is ok, but when one or more files are missing, the application is freezing and "finish" section doesn't even start.

mscdex commented 9 years ago

The problem is that you're ignoring the file stream in both your else conditions and in your switch's missing default case. For those situations you should at least file.resume(); so that the parser can continue to process the rest of the request data.

kuba12kozak commented 9 years ago

It helped. Thank you very much.