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

Merge branch 'master' of https://github.com/amphp/dns into new-blocking

This commit is contained in:
Daniil Gentili 2019-12-13 03:04:02 +01:00
commit ecbeca2ae0
2 changed files with 2 additions and 6 deletions

View File

@ -22,8 +22,8 @@ $customConfigLoader = new class implements Dns\ConfigLoader {
Dns\resolver(new Dns\Rfc1035StubResolver(null, $customConfigLoader));
Loop::run(function () {
$hostname = "amphp.org";
Loop::run(function () use ($argv) {
$hostname = $argv[1] ?? "amphp.org";
try {
pretty_print_records($hostname, yield Dns\resolve($hostname));

View File

@ -154,10 +154,6 @@ final class Rfc1035StubResolver implements Resolver
: [new Record('127.0.0.1', Record::A, null)];
}
if (!$dots && \count($this->config->getSearchList()) === 0) {
throw new DnsException("Giving up resolution of '{$name}', unknown host");
}
$searchList = [null];
if (!$trailingDot && $dots < $this->config->getNdots()) {
$searchList = \array_merge($this->config->getSearchList(), $searchList);