Don't shuffle dns addresses
This commit is contained in:
parent
b2f5febbf9
commit
82419f17dd
1 changed files with 2 additions and 3 deletions
|
@ -7,7 +7,6 @@ import type { LookupAddress } from 'dns';
|
|||
import net from 'net';
|
||||
import tls from 'tls';
|
||||
import { callbackify, promisify } from 'util';
|
||||
import { shuffle } from 'lodash';
|
||||
import pTimeout from 'p-timeout';
|
||||
|
||||
import * as log from '../logging/log';
|
||||
|
@ -55,8 +54,8 @@ export class Agent extends HTTPSAgent {
|
|||
throw new Error(`Agent.createConnection: failed to resolve ${host}`);
|
||||
}
|
||||
|
||||
const v4 = shuffle(addresses.filter(({ family }) => family === 4));
|
||||
const v6 = shuffle(addresses.filter(({ family }) => family === 6));
|
||||
const v4 = addresses.filter(({ family }) => family === 4);
|
||||
const v6 = addresses.filter(({ family }) => family === 6);
|
||||
|
||||
// Interleave addresses for Happy Eyeballs, but keep the first address
|
||||
// type from the DNS response first in the list.
|
||||
|
|
Loading…
Reference in a new issue