Skip to content

Commit a1a9754

Browse files
authored
Merge pull request #115 from clue-labs/timer
Fix forward compatibility with upcoming EventLoop releases in example
2 parents 007358c + c08e2a6 commit a1a9754

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/benchmark-throughput.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
});
3434

3535
// print stream position once stream closes
36-
$in->on('close', function () use ($fh, $start, $timeout, $info) {
36+
$in->on('close', function () use ($fh, $start, $loop, $timeout, $info) {
3737
$t = microtime(true) - $start;
38-
$timeout->cancel();
38+
$loop->cancelTimer($timeout);
3939

4040
$bytes = ftell($fh);
4141

0 commit comments

Comments
 (0)