diff --git a/Handler/OnServerWorker.php b/Handler/OnServerWorker.php index 0536e0b..3058293 100644 --- a/Handler/OnServerWorker.php +++ b/Handler/OnServerWorker.php @@ -19,6 +19,7 @@ use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use ReflectionException; use Swoole\Server; +use Swoole\Timer; /** diff --git a/Server.php b/Server.php index d3d02c5..8d73f59 100644 --- a/Server.php +++ b/Server.php @@ -127,7 +127,7 @@ class Server extends HttpService */ protected function onWorkerListener(): void { - $this->provider->on(OnWorkerStop::class, '\Swoole\Timer::clearAll'); + $this->provider->on(OnWorkerStop::class, '\Swoole\Timer::clearAll', 9999); $this->provider->on(OnWorkerStart::class, [$this, 'setWorkerName']); $this->provider->on(OnTaskerStart::class, [$this, 'setTaskerName']); }