From b4a506ab91fb010d5001cff9c3a819bde86e6d1b Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 27 Feb 2021 05:14:16 +0800 Subject: [PATCH] modify --- HttpServer/Events/OnWorkerStart.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/HttpServer/Events/OnWorkerStart.php b/HttpServer/Events/OnWorkerStart.php index 875bc648..aa18f718 100644 --- a/HttpServer/Events/OnWorkerStart.php +++ b/HttpServer/Events/OnWorkerStart.php @@ -15,6 +15,7 @@ use Snowflake\Process\Process; use Snowflake\Snowflake; use Swoole\Coroutine; use Swoole\Server; +use Swoole\Timer; /** * Class OnWorkerStart @@ -70,6 +71,8 @@ class OnWorkerStart extends Callback { Coroutine\go(function (Server $server, $worker_id) { $sigkill = Coroutine::waitSignal(SIGTERM | SIGKILL | SIGUSR2 | SIGUSR1); + + Timer::clearAll(); if ($sigkill === false) { do { $number = Co::stats()['coroutine_num'];