Skip to content

net: emit error on invalid address family - #19415

Merged
cjihrig merged 1 commit into
nodejs:masterfrom
cjihrig:19407
Mar 19, 2018
Merged

net: emit error on invalid address family#19415
cjihrig merged 1 commit into
nodejs:masterfrom
cjihrig:19407

Conversation

@cjihrig

Copy link
Copy Markdown
Contributor

This commit adds proper error handling to net.connect() when a custom lookup() function returns an invalid address family.

Fixes: #19407

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added errors Issues and PRs related to JavaScript errors originated in Node.js core. net Issues and PRs related to the net subsystem. labels Mar 17, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

common.expectsError?

@cjihrig

Copy link
Copy Markdown
ContributorAuthor

Updated to use common.expectsError(). CI: https://ci.nodejs.org/job/node-test-pull-request/13743/

This commit adds proper error handling to net.connect() when
a custom lookup() function returns an invalid address family.
PR-URL: nodejs#19415Fixes: nodejs#19407
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins

Copy link
Copy Markdown
Contributor

Should this be backported to v9.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

BridgeAR pushed a commit to BridgeAR/node that referenced this pull request May 1, 2018
This commit adds proper error handling to net.connect() when
a custom lookup() function returns an invalid address family.
PR-URL: nodejs#19415Fixes: nodejs#19407
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

errorsIssues and PRs related to JavaScript errors originated in Node.js core.netIssues and PRs related to the net subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@cjihrig@MylesBorins@jasnell@addaleax@santigimeno@targos@XadillaX@joyeecheung@richardlau@nodejs-github-bot