add null check

This commit is contained in:
Girish Ramakrishnan
2015-10-30 16:24:56 -07:00
parent 01cd0b6b87
commit 5bd8579e73

View File

@@ -103,8 +103,8 @@ function getTxtRecords(callback) {
function checkDns() {
getTxtRecords(function (error, records) {
if (error) {
debug('checkDns: DNS error looking up TXT records for %s', config.fqdn(), error);
if (error || !records) {
debug('checkDns: DNS error or no records looking up TXT records for %s %s', config.fqdn(), error, records);
gCheckDnsTimerId = setTimeout(checkDns, 60000);
return;
}