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

net: deferred self.destroy calls in internalConnect(Multiple) to next… #51038

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

Conversation

timothyjrogers
Copy link

… tick

self.destroy calls in the internalConnect adn internalConnectMultiple functions have a narrow case where they can throw before an error handler has been established. This change defers them to the next tick to allow time for the error handler to be set.

Fixes: #48771

… tick

self.destroy calls in the internalConnect adn internalConnectMultiple
functions have a narrow case where they can throw before an error
handler has been established. This change defers them to the next
tick to allow time for the error handler to be set.

Fixes: nodejs#48771
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem. labels Dec 4, 2023
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.

Could you add a test for this?

lib/net.js Show resolved Hide resolved
@ShogunPanda
Copy link
Contributor

Once you add a test as @mcollina requested, it will LGTM.

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. net Issues and PRs related to the net subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conditional unhandled 'error' event when http.request with .lookup
4 participants