-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
lib: refactor Socket._getpeername and Socket._getsockname #32969
Conversation
5008754
to
7d4d597
Compare
if (!this._handle || !this._handle.getpeername) { | ||
return this._peername || {}; | ||
} else if (!this._peername) { | ||
this._peername = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a functional change in that before errors can be transient, i.e., the first call can return an empty object while the second call can return a full-fledged address object. Now errors are no longer transient because the empty object is cached.
It's a probably inconsequential change in behavior but I'd label it semver-major anyway.
Marking semver-major per #32969 (comment) |
8ae28ff
to
2935f72
Compare
@nodejs/tsc ... since this is semver-major we need another TSC signoff |
Removed the author ready because this needs at least one more tsc signoff in order to land |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Commit Queue failed- Loading data for nodejs/node/pull/32969 ✔ Done loading data for nodejs/node/pull/32969 ----------------------------------- PR info ------------------------------------ Title lib: refactor Socket._getpeername and Socket._getsockname (#32969) Author Himself65 (@Himself65) Branch Himself65:20200421-address -> nodejs:master Labels author ready, net, semver-major Commits 5 - lib: refactor Socket._getpeername and Socket._getsockname - fixup! - fixup! backport - fixup! - fixup! edit comment Committers 2 - himself65 - GitHub PR-URL: https://github.com/nodejs/node/pull/32969 Refs: https://github.com/nodejs/node/blob/7893c70970adfbefb1684c48d42aff7385a2afb8/src/node_internals.h#L79-L85 Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis Reviewed-By: Matteo Collina ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/32969 Refs: https://github.com/nodejs/node/blob/7893c70970adfbefb1684c48d42aff7385a2afb8/src/node_internals.h#L79-L85 Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis Reviewed-By: Matteo Collina -------------------------------------------------------------------------------- ✔ Last GitHub Actions successful ℹ Last Full PR CI on 2020-10-16T23:28:31Z: https://ci.nodejs.org/job/node-test-pull-request/33684/ - Querying data for job/node-test-pull-request/33684/ ✔ Build data downloaded - Querying failures of job/node-test-commit/41438/ ✔ Data downloaded ✖ 2 failure(s) on the last Jenkins CI run ℹ This PR was created on Tue, 21 Apr 2020 12:04:10 GMT ✔ Approvals: 3 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/32969#pullrequestreview-417884204 ✔ - Ben Noordhuis (@bnoordhuis): https://github.com/nodejs/node/pull/32969#pullrequestreview-418200196 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/32969#pullrequestreview-464801397 -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncu Commit Queue action: https://github.com/nodejs/node/actions/runs/311694300 |
Landed in 1428db8 |
PR-URL: #32969 Refs: https://github.com/nodejs/node/blob/7893c70970adfbefb1684c48d42aff7385a2afb8/src/node_internals.h#L79-L85 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Refs:
node/src/node_internals.h
Lines 79 to 85 in 7893c70
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes