Skip to content

repl: fix eval errors thrown after close throwing ERR_USE_AFTER_CLOSE #58791

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dario-piotrowicz
Copy link
Member

Fixes #58784

prevent incorrect throws of ERR_USE_AFTER_CLOSE errors when the eval function of a repl server returns an error after the repl server has been closed

prevent incorrect throws of `ERR_USE_AFTER_CLOSE` errors when the eval
function of a repl server returns an error after the repl server
has been closed
@dario-piotrowicz dario-piotrowicz requested a review from lpinca June 22, 2025 12:41
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem. labels Jun 22, 2025
Copy link

codecov bot commented Jun 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.09%. Comparing base (d7becc5) to head (6851671).
Report is 33 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58791      +/-   ##
==========================================
- Coverage   90.10%   90.09%   -0.01%     
==========================================
  Files         640      640              
  Lines      188287   188291       +4     
  Branches    36916    36926      +10     
==========================================
- Hits       169651   169636      -15     
- Misses      11355    11385      +30     
+ Partials     7281     7270      -11     
Files with missing lines Coverage Δ
lib/repl.js 94.88% <100.00%> (+0.01%) ⬆️

... and 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

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

RSLGMT

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 22, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 22, 2025
@nodejs-github-bot
Copy link
Collaborator

@hildjj
Copy link

hildjj commented Jun 22, 2025

I have confirmed that this patch fixes my issue.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERR_USE_AFTER_CLOSE in repl with async eval
5 participants