Skip to content

Commit f9a8b04

Browse files
committed
Fix examples in react/dns README
1 parent bb4fee3 commit f9a8b04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ names, baby!
1616
$factory = new React\Dns\Resolver\Factory();
1717
$dns = $factory->create('8.8.8.8', $loop);
1818

19-
$dns->resolve('igor.io', function ($ip) {
19+
$dns->resolve('igor.io')->then(function ($ip) {
2020
echo "Host: $ip\n";
2121
});
2222

@@ -30,13 +30,13 @@ You can cache results by configuring the resolver to use a `CachedExecutor`:
3030
$factory = new React\Dns\Resolver\Factory();
3131
$dns = $factory->createCached('8.8.8.8', $loop);
3232

33-
$dns->resolve('igor.io', function ($ip) {
33+
$dns->resolve('igor.io')->then(function ($ip) {
3434
echo "Host: $ip\n";
3535
});
3636

3737
...
3838

39-
$dns->resolve('igor.io', function ($ip) {
39+
$dns->resolve('igor.io')->then(function ($ip) {
4040
echo "Host: $ip\n";
4141
});
4242

0 commit comments

Comments
 (0)