fix tcp_dns.js checking for SRV lookup

This commit is contained in:
Romain Beaumont 2018-10-07 20:05:28 +02:00
parent ed25865f21
commit bbaf3f05ff
No known key found for this signature in database
GPG key ID: DB60E388B3BCF286

View file

@ -22,7 +22,7 @@ module.exports = function (client, options) {
// Error resolving domain
if (err) {
// Could not resolve SRV lookup, connect directly
if (err.code === 'ENODATA') {
if (err.code === 'ENODATA' || err.code === 'ENOTFOUND') {
client.setSocket(net.connect(options.port, options.host))
return
} else {