Skip to content

Commit

Permalink
fix: ignore ENOTFOUND during TXT record lookup
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mbroadst committed Nov 19, 2020
1 parent 9a176ef commit b1e15a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/connection_string.ts
Expand Up @@ -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;
Expand Down

0 comments on commit b1e15a8

Please sign in to comment.