Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
"react/event-loop": "^1.2",
"react/dns": "^1.7",
"react/promise": "~2.1|~1.2"
"react/promise": "^3 || ^2.1 || ^1.2"
},
"require-dev": {
"clue/block-react": "~1.0",
Expand Down
3 changes: 1 addition & 2 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use React\EventLoop\Loop;
use React\EventLoop\LoopInterface;
use React\Promise;
use React\Promise\CancellablePromiseInterface;
use \Exception;

class Factory
Expand Down Expand Up @@ -140,7 +139,7 @@ function ($_, $reject) use ($promise) {
$reject(new \RuntimeException('Cancelled creating socket during DNS lookup'));

// (try to) cancel pending DNS lookup, otherwise ignoring its results
if ($promise instanceof CancellablePromiseInterface) {
if (\method_exists($promise, 'cancel')) {
$promise->cancel();
}
}
Expand Down