mirror of
https://github.com/danog/dns.git
synced 2024-11-26 20:14:51 +01:00
Fix host loading on Windows
This commit is contained in:
parent
70205d9282
commit
ad55bcf870
@ -8,6 +8,12 @@ use Amp\WindowsRegistry\WindowsRegistry;
|
||||
use function Amp\call;
|
||||
|
||||
final class WindowsConfigLoader implements ConfigLoader {
|
||||
private $hostLoader;
|
||||
|
||||
public function __construct(HostLoader $hostLoader = null) {
|
||||
$this->hostLoader = $hostLoader ?? new HostLoader;
|
||||
}
|
||||
|
||||
public function loadConfig(): Promise {
|
||||
return call(function () {
|
||||
$keys = [
|
||||
@ -67,7 +73,9 @@ final class WindowsConfigLoader implements ConfigLoader {
|
||||
}
|
||||
}
|
||||
|
||||
return new Config($nameservers);
|
||||
$hosts = yield $this->hostLoader->loadHosts();
|
||||
|
||||
return new Config($nameservers, $hosts);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ class IntegrationTest extends TestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $hostname
|
||||
* @group internet
|
||||
*/
|
||||
public function testWorksAfterConfigReload() {
|
||||
|
Loading…
Reference in New Issue
Block a user