1
0
mirror of https://github.com/danog/dns.git synced 2024-11-26 20:14:51 +01:00

Use google DNS if cannot load config

This commit is contained in:
Daniil Gentili 2018-12-24 12:49:01 +01:00
parent 836b0896b0
commit e943bcfde7

View File

@ -326,7 +326,11 @@ final class BasicResolver implements Resolver {
}
$promise = call(function () {
$this->config = yield $this->configLoader->loadConfig();
try {
$this->config = yield $this->configLoader->loadConfig();
} catch (\Exception $e) {
$this->config = new Config(['8.8.8.8:53', '8.8.4.4:53', '[2001:4860:4860::8888]:53', '[2001:4860:4860::8844]:53']);
}
});
$this->pendingConfig = $promise;