diff --git a/lib/regbot.js b/lib/regbot.js index 9d5f5bb..ea5a536 100644 --- a/lib/regbot.js +++ b/lib/regbot.js @@ -216,7 +216,18 @@ class Regbot { } else { const addrs = await dnsResolverSrv(this.logger, this.ipv4, this.transport); - this.addresses.push(...addrs); + if (addrs.length) { + this.addresses.push(...addrs); + } else { + this.logger.info({ipv4: this.ipv4, transport: this.transport}, + 'No SRV addresses found for reg-gateway'); + const addrsARecord = await dnsResolverA(this.logger, this.ipv4); + if (addrsARecord.length) { + this.addresses.push(...addrsARecord); + } else { + this.logger.info({ipv4: this.ipv4}, 'No A record found for reg-gateway'); + } + } } } if (this.addresses.length) {