Skip to content

Commit c08e2a6

Browse files
committed
Fix forward compatibility with upcoming EventLoop releases in example
1 parent ef3effa commit c08e2a6

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)