Skip to content

fix: clear [kState].readyPromise for garbage collection#6030

Merged
mcollina merged 1 commit intofastify:mainfrom
LiviaMedeiros:fix-ready-promise
Mar 30, 2025
Merged

fix: clear [kState].readyPromise for garbage collection#6030
mcollina merged 1 commit intofastify:mainfrom
LiviaMedeiros:fix-ready-promise

Conversation

@LiviaMedeiros
Copy link
Copy Markdown
Contributor

Disclaimer: this is committed with --no-verify because penultimate test fails locally with EAFNOSUPPORT.

Checklist

Once support of Node.js older than v22.x is dropped, this should probably be rewritten using Promise.withResolvers().

Without the patch, assert.strictEqual might hang and timeout instead of failing immediately. Didn't look into it closely, i guess combination of resolved promise and circular references might trigger a bug in strictEqual()?

Copy link
Copy Markdown
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

@mcollina mcollina merged commit 9dc6486 into fastify:main Mar 30, 2025
25 checks passed
@github-actions
Copy link
Copy Markdown

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 Mar 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants