Skip to content

Commit

Permalink
Merge pull request #5 from WyriHaximus-labs/react-eventloop-1.0-0.5-0.4
Browse files Browse the repository at this point in the history
Forward compatibility with react/event-loop 1.0 and 0.5 while still supporting 0.4
  • Loading branch information
mbonneau authored Apr 9, 2018
2 parents b2a9a25 + 584f102 commit 532604a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"require": {
"voryx/thruway-common": "^1.0",
"react/event-loop": "^0.4.3",
"react/event-loop": "^1.0 || ^0.5 || ^0.4.3",
"evenement/evenement": "^3.0 || ^2.0",
"psr/log": "^1.0",
"react/promise-timer": "^1.2.1"
Expand Down
4 changes: 2 additions & 2 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function __construct(Array $options, LoopInterface $loop = null)
*/
public function doEvents($timer = 1)
{
$loop = $this->getClient()->getLoop();
/*$loop = $this->getClient()->getLoop();
$looping = true;
$loop->addTimer($timer, function () use (&$looping) {
Expand All @@ -86,7 +86,7 @@ public function doEvents($timer = 1)
while ($looping) {
usleep(1000);
$loop->tick();
}
}*/
}

/**
Expand Down

0 comments on commit 532604a

Please sign in to comment.