1
0
mirror of https://github.com/danog/amp.git synced 2024-11-27 04:24:42 +01:00

Fixed NativeReactor example by making the reactor instance available in scope

This commit is contained in:
PeeHaa 2015-02-21 15:59:07 +01:00
parent 916306533a
commit 2631403ecd

View File

@ -144,7 +144,7 @@ $reactor->run(function($reactor) use (&$stdinWatcher, &$number) {
$number = fgets(STDIN);
$reactor->stop();
});
$reactor->once(function() {
$reactor->once(function(Amp\Reactor $reactor) {
$reactor->stop();
}, $msInterval = 5000);
});