This took quite a bit to understand what was happening... and ultimately looks like it was a typo. req.on("close"... was racing with bb.on("finish"..., and it seems that is because req.on("close"... should actually be bb.on("close"....
One note about the current setup of bb.on("finish") and bb.on("close") is that (if I am understanding correctly) it is possible that we would move the temp files into place before the file stream buffer is actually finished/closed. See the answer from mscdex (busboy author).
Closes: #87
This took quite a bit to understand what was happening... and ultimately looks like it was a typo.
req.on("close"...
was racing withbb.on("finish"...
, and it seems that is becausereq.on("close"...
should actually bebb.on("close"...
.One note about the current setup of
bb.on("finish")
andbb.on("close")
is that (if I am understanding correctly) it is possible that we would move the temp files into place before the file stream buffer is actually finished/closed. See the answer from mscdex (busboy author).