Skip to content

Commit

Permalink
net: linted code
Browse files Browse the repository at this point in the history
  • Loading branch information
ShogunPanda committed Feb 27, 2023
1 parent 505a1fc commit 07f04b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 07f04b2

Please sign in to comment.