Skip to content

Commit b1e15a8

Browse files
committed
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
1 parent 9a176ef commit b1e15a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/connection_string.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function parseSrvConnectionString(uri: string, options: any, callback: Callback)
8888
// Resolve TXT record and add options from there if they exist.
8989
dns.resolveTxt(lookupAddress, (err?: any, record?: any) => {
9090
if (err) {
91-
if (err.code !== 'ENODATA') {
91+
if (err.code !== 'ENODATA' && err.code !== 'ENOTFOUND') {
9292
return callback(err);
9393
}
9494
record = null;

0 commit comments

Comments
 (0)