@@ 210-216 (lines=7) @@ | ||
207 | */ |
|
208 | public function resolve($hostname, $cb, $noncache = false, $nameServers = []) |
|
209 | { |
|
210 | if (!$this->preloading->hasCompleted()) { |
|
211 | $pool = $this; |
|
212 | $this->preloading->addListener(function ($job) use ($hostname, $cb, $noncache, $pool, $nameServers) { |
|
213 | $pool->resolve($hostname, $cb, $noncache, $nameServers); |
|
214 | }); |
|
215 | return; |
|
216 | } |
|
217 | $hostname = rtrim($hostname, '.') . '.'; |
|
218 | if (isset($this->hosts[$hostname])) { |
|
219 | $cb($this->hosts[$hostname]); |
|
@@ 289-294 (lines=6) @@ | ||
286 | if (!$nameServers) { |
|
287 | $nameServers = $this->nameServers; |
|
288 | } |
|
289 | if (!$this->preloading->hasCompleted()) { |
|
290 | $this->preloading->addListener(function ($job) use ( |
|
291 | $hostname, |
|
292 | $cb, |
|
293 | $noncache, |
|
294 | $pool, |
|
295 | $nameServers, |
|
296 | $proto |
|
297 | ) { |