Skip to content

Commit 2b4839f

Browse files
committed
pr feedback
1 parent 686952c commit 2b4839f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎doc/api/net.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,7 @@ to `listen()` or `new net.Socket()` later on. For `listen()` this enables
17051705
synchronous port reservation, while for `new net.Socket()`, it allows control
17061706
over the local egress port/IP, via `bind(2)` semantics.
17071707

1708-
A `BoundSocket` binds either a TCP endpoint (`host`/`port`) or a
1708+
A `BoundSocket` binds either a TCP endpoint (`host` or `port`) or a
17091709
Unix domain/named-pipe endpoint (`path`); the two are mutually exclusive. For a
17101710
`path`, the file system entry is reserved in the constructor, so conflicts such
17111711
as `EADDRINUSE` throw synchronously exactly as a TCP bind does. On Linux a

‎lib/net.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,9 @@ class BoundSocket {
463463
// selects the Linux abstract namespace. path is mutually exclusive with the
464464
// TCP options; uv_pipe_bind is synchronous so conflicts throw here.
465465
#bindPipe(options) {
466-
const { path } = options;
467-
if (options.host !== undefined || options.port !== undefined ||
468-
options.ipv6Only !== undefined || options.reusePort !== undefined) {
466+
const { path, host, port, ipv6Only, reusePort } = options;
467+
if (host !== undefined || port !== undefined ||
468+
ipv6Only !== undefined || reusePort !== undefined) {
469469
throw new ERR_INVALID_ARG_VALUE(
470470
'options', options,
471471
'path is mutually exclusive with host, port, ipv6Only, and reusePort');

0 commit comments

Comments
 (0)