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:
commit
ecbeca2ae0
@ -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));
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user