From b1e15a8b038ec9214b977f4653cc8853329e4a41 Mon Sep 17 00:00:00 2001 From: Matt Broadstone Date: Thu, 19 Nov 2020 08:49:42 -0500 Subject: [PATCH] fix: ignore ENOTFOUND during TXT record lookup The "initial seedlist discovery" spec is underspecified on what to do when a TXT lookup fails, but for the time being we will treat non-existence as an empty result --- src/connection_string.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection_string.ts b/src/connection_string.ts index 2cdc103c4d..2e9d8bdd27 100644 --- a/src/connection_string.ts +++ b/src/connection_string.ts @@ -88,7 +88,7 @@ function parseSrvConnectionString(uri: string, options: any, callback: Callback) // Resolve TXT record and add options from there if they exist. dns.resolveTxt(lookupAddress, (err?: any, record?: any) => { if (err) { - if (err.code !== 'ENODATA') { + if (err.code !== 'ENODATA' && err.code !== 'ENOTFOUND') { return callback(err); } record = null;