m4nuC / async-busboy

Promise based multipart form parser for KoaJS
MIT License
167 stars 58 forks source link

Sometime asyncBusboy never responding #56

Open yjinchoi opened 1 year ago

yjinchoi commented 1 year ago

Sometimes I found that asyncBusboy not responding because promise never resolved or rejected. I traced inside asyncBusBoy source code and I found that sometimes request's 'close' event handler called before busboy's 'finish' handler ( before onEnd called). I modified source code like "request.on('close', onEnd)" instead of "request.on('close', cleanup)" and it works perfectly. I'm afraid I'm doing wrong and make some side effects. Replacing handler to onEnd instead of cleanup is safe?

lkraav commented 6 months ago

Probably duplicate of #49

ardelio commented 5 months ago

I don't think the issue is with async-busboy, but instead Koa.

NodeJS http library is closing the request when I would expect it not to. The issue here is, I think, figuring out why http is issuing the close event, when we are in the depths of our application code 🤔