From 6ba0cac3f3b54e92d896167e07f7fc07b3d49b1d Mon Sep 17 00:00:00 2001 From: tigerbot Date: Fri, 14 Jul 2017 17:04:24 -0600 Subject: [PATCH] made mDNS query for paywall check more error resistant --- packages/apis/com.daplie.goldilocks/index.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/apis/com.daplie.goldilocks/index.js b/packages/apis/com.daplie.goldilocks/index.js index 1855644..3bb7a32 100644 --- a/packages/apis/com.daplie.goldilocks/index.js +++ b/packages/apis/com.daplie.goldilocks/index.js @@ -85,12 +85,8 @@ module.exports.create = function (deps, conf) { var dns = PromiseA.promisifyAll(require('dns')); var proms = testDomains.map(function (dom) { return dns.resolve6Async(dom) - .catch(function (err) { - if (err.code === 'ENODATA') { - return dns.resolve4Async(dom); - } else { - return PromiseA.reject(err); - } + .catch(function () { + return dns.resolve4Async(dom); }) .then(function (result) { return result[0];