Skip to content

fix: handle two busboy error events#1296

Closed
mhassan1 wants to merge 2 commits into
expressjs:ltsfrom
mhassan1:two-busboy-error-events
Closed

fix: handle two busboy error events#1296
mhassan1 wants to merge 2 commits into
expressjs:ltsfrom
mhassan1:two-busboy-error-events

Conversation

@mhassan1
Copy link
Copy Markdown
Contributor

This PR enables multer to handle two out-of-band error events from busboy; it does this by replacing process.nextTick (which happens too soon after the first error event) with setImmediate.

I don't know if this fix will handle more than two, but I also don't think busboy will ever emit more than two.

This is a follow-up to #1177.

Resolves #1176.

@mhassan1
Copy link
Copy Markdown
Contributor Author

@UlisesGascon @LinusU Please take a look, when you have a chance. Thanks.

@LinusU
Copy link
Copy Markdown
Member

LinusU commented Apr 22, 2025

Could you duplicate the test into a new one, instead of modifying the current one, so that we are sure that the previous single error is also handled? 🙏

@mhassan1
Copy link
Copy Markdown
Contributor Author

Could you duplicate the test into a new one, instead of modifying the current one, so that we are sure that the previous single error is also handled? 🙏

@LinusU Done, please take a look.

@mhassan1
Copy link
Copy Markdown
Contributor Author

mhassan1 commented May 6, 2025

@UlisesGascon @LinusU Please take a look, when you have a chance. Thanks.

@UlisesGascon UlisesGascon requested a review from LinusU May 9, 2025 13:09
@UlisesGascon
Copy link
Copy Markdown
Member

Not sure why the CI pipeline was not triggered 🤔

@bjohansebas
Copy link
Copy Markdown
Member

@UlisesGascon see #1302

@mhassan1
Copy link
Copy Markdown
Contributor Author

@UlisesGascon @LinusU Are the CI failures blockers to this PR? The tests are passing on supported Node.js versions.

@ctcpip
Copy link
Copy Markdown
Member

ctcpip commented May 16, 2025

this looks good, but we are pulling in this fix as part of another PR. I will update when that gets merged. thank you!

Copy link
Copy Markdown
Member

@ctcpip ctcpip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waiting to merge, please hold

@ctcpip
Copy link
Copy Markdown
Member

ctcpip commented May 19, 2025

resolved via 2c8505f

thanks everyone!

@ctcpip ctcpip closed this May 19, 2025
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.

5 participants