Skip to content

Commit 2677613

Browse files
author
ThijsFeryn
committed
Add $loop->run(); to actually start the resolving process
1 parent f0c1407 commit 2677613

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ names, baby!
2222
$dns->resolve('igor.io')->then(function ($ip) {
2323
echo "Host: $ip\n";
2424
});
25+
26+
$loop->run();
2527
```
2628

2729
But there's more.
@@ -44,6 +46,8 @@ You can cache results by configuring the resolver to use a `CachedExecutor`:
4446
$dns->resolve('igor.io')->then(function ($ip) {
4547
echo "Host: $ip\n";
4648
});
49+
50+
$loop->run();
4751
```
4852

4953
If the first call returns before the second, only one query will be executed.

0 commit comments

Comments
 (0)