Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uploads race #91

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Fix uploads race #91

merged 1 commit into from
Jan 29, 2024

Conversation

vahtos
Copy link
Contributor

@vahtos vahtos commented Jan 26, 2024

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 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).

@markhughes
Copy link
Collaborator

Thanks for spending the time to research this one!

@markhughes markhughes merged commit ecafda4 into droppyjs:canary Jan 29, 2024
13 of 14 checks passed
@vahtos vahtos deleted the fix_uploads branch January 29, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File uploads fail randomly
2 participants