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 request hanging when synchronously returning a value in setErrorHandler #3211

Merged
merged 2 commits into from Jul 24, 2021
Merged

Fix request hanging when synchronously returning a value in setErrorHandler #3211

merged 2 commits into from Jul 24, 2021

Conversation

weiliddat
Copy link
Contributor

@weiliddat weiliddat commented Jul 24, 2021

Checklist

Comments

Resolves #3209

Make setErrorHandler consistent in handling return values, like in lib/handleRequest.js

if (result !== undefined) {
if (result !== null && typeof result.then === 'function') {
wrapThenable(result, reply)
} else {
reply.send(result)
}
}

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@Eomm Eomm added the bugfix Issue or PR that should land as semver patch label Jul 24, 2021
@Eomm Eomm merged commit aa58990 into fastify:main Jul 24, 2021
This was referenced Aug 2, 2021
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2022
@weiliddat weiliddat deleted the 3209 branch July 25, 2022 07:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bugfix Issue or PR that should land as semver patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request hangs when returning in setErrorHandler
3 participants