diff --git a/doc/api/net.md b/doc/api/net.md index 16402c5e537359..5bf318374bdbec 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -871,7 +871,7 @@ behavior. added: v0.1.90 changes: - version: REPLACEME - pr-url: REPLACEME + pr-url: https://github.com/nodejs/node/pull/46790 description: The default value for the autoSelectFamily option is now true. The `--enable-network-family-autoselection` has been renamed to `--network-family-autoselection`. The old name is now an @@ -943,11 +943,11 @@ For TCP connections, available `options` are: Ignored if the `family` option is not `0` or if `localAddress` is set. Connection errors are not emitted if at least one connection succeeds. If all connections attempts fails a single `AggregateError` with all failed attempts is emitted. - **Default:** \[`net.getDefaultAutoSelectFamily()`]\[] + **Default:** [`net.getDefaultAutoSelectFamily()`][] * `autoSelectFamilyAttemptTimeout` {number}: The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. If set to a positive integer less than `10`, then the value `10` will be used instead. - **Default:** \[`net.getDefaultAutoSelectFamilyAttemptTimeout()`]\[] + **Default:** [`net.getDefaultAutoSelectFamilyAttemptTimeout()`][] For [IPC][] connections, available `options` are: @@ -1756,6 +1756,8 @@ net.isIPv6('fhqwhgads'); // returns false [`net.createConnection(path)`]: #netcreateconnectionpath-connectlistener [`net.createConnection(port, host)`]: #netcreateconnectionport-host-connectlistener [`net.createServer()`]: #netcreateserveroptions-connectionlistener +[`net.getDefaultAutoSelectFamily()`]: #netgetdefaultautoselectfamily +[`net.getDefaultAutoSelectFamilyAttemptTimeout()`]: #netgetdefaultautoselectfamilyattempttimeout [`new net.Socket(options)`]: #new-netsocketoptions [`readable.setEncoding()`]: stream.md#readablesetencodingencoding [`server.close()`]: #serverclosecallback diff --git a/src/node_options.cc b/src/node_options.cc index e30cbc6d8a8c4c..61efa81bac1c2d 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -363,7 +363,8 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { &EnvironmentOptions::network_family_autoselection, kAllowedInEnvvar, true); - AddAlias("--enable-network-family-autoselection", "--network-family-autoselection"); + AddAlias("--enable-network-family-autoselection", + "--network-family-autoselection"); AddOption("--enable-source-maps", "Source Map V3 support for stack traces", &EnvironmentOptions::enable_source_maps,