From eab8f2338622218a1e57121a31cad493f462931b Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 4 Mar 2024 18:23:00 +0100 Subject: [PATCH] perf(NODE-5986): parallelize SRV/TXT resolution (#4012) --- src/connection_string.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/connection_string.ts b/src/connection_string.ts index fdc4e47ab22..e6ae0b82b2f 100644 --- a/src/connection_string.ts +++ b/src/connection_string.ts @@ -68,8 +68,15 @@ export async function resolveSRVRecord(options: MongoOptions): Promise { + /* rejections will be handled later */ + }); + + // Resolve the SRV record and use the result as the list of hosts to connect to. const addresses = await dns.promises.resolveSrv( `_${options.srvServiceName}._tcp.${lookupAddress}` ); @@ -88,10 +95,10 @@ export async function resolveSRVRecord(options: MongoOptions): Promise