diff --git a/system/Process/Leafleting.php b/system/Process/Leafleting.php index 3486adf0..96d8779f 100644 --- a/system/Process/Leafleting.php +++ b/system/Process/Leafleting.php @@ -6,6 +6,7 @@ namespace Snowflake\Process; use Exception; use Snowflake\Snowflake; +use Swoole\Coroutine; use Swoole\Timer; /** @@ -21,9 +22,11 @@ class Leafleting extends Process */ public function onHandler(\Swoole\Process $process) { - Timer::tick(1000, function () use ($process) { + while (true) { var_dump($process->read()); - }); + + Coroutine::sleep(1); + } } }