Skip to content

Conversation

@cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Mar 17, 2018

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-bot nodejs-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
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
Contributor Author

cjihrig commented Mar 19, 2018

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#19415
Fixes: 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>
@cjihrig cjihrig merged commit 7c73cd4 into nodejs:master Mar 19, 2018
@cjihrig cjihrig deleted the 19407 branch March 19, 2018 18:51
@MylesBorins
Copy link
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#19415
Fixes: 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants