Skip to content

Commit 8132828

Browse files
indutnyjuanarbol
authored andcommitted
net: fix address iteration with autoSelectFamily
When `autoSelectFamily` is set to `true`, `net.connect` is supposed to try connecting to both IPv4 and IPv6, interleaving the address types. Instead, it appears that the array that holds the addresses in the order they should be attempted was never used after being populated. PR-URL: #48258 Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]>
1 parent 97ff063 commit 8132828

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/net.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,7 @@ function lookupAndConnectMultiple(self, async_id_symbol, lookup, host, options,
14121412

14131413
const context = {
14141414
socket: self,
1415-
addresses,
1415+
addresses: toAttempt,
14161416
current: 0,
14171417
port,
14181418
localPort,

0 commit comments

Comments
 (0)