Skip to content

Commit 55b0eda

Browse files
committed
Forward compatibility with upcoming EventLoop v1 and below
1 parent 403dd83 commit 55b0eda

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
},
1616
"require": {
1717
"php": ">=5.3",
18-
"react/event-loop": "~0.4.0|~0.3.0",
18+
"clue/qdatastream": "^0.6",
19+
"react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3",
1920
"react/promise": "~2.0|~1.1",
2021
"react/socket": "^1.0 || ^0.8 || ^0.7",
21-
"react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.6",
22-
"clue/qdatastream": "^0.6"
22+
"react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.6"
2323
},
2424
"require-dev": {
2525
"clue/block-react": "^1.1",

examples/connect.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@
127127

128128
$client->writeClientInit();
129129

130-
$client->on('close', function () use (&$timer) {
130+
$client->on('close', function () use (&$timer, $loop) {
131131
var_dump('CLOSED');
132-
$timer->cancel();
132+
$loop->cancelTimer($timer);
133133
});
134134

135135
$timer = $loop->addTimer(60.0 * 60, function ($timer) use ($client) {

0 commit comments

Comments
 (0)