From 828880c3fe1544a4e0606d225d8f6106bb9261ca Mon Sep 17 00:00:00 2001 From: Marick van Tuil Date: Wed, 25 Dec 2024 18:50:11 +0100 Subject: [PATCH] Reset pcntl alarm when application is killed too --- src/Worker.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Worker.php b/src/Worker.php index 2b88585..e406902 100644 --- a/src/Worker.php +++ b/src/Worker.php @@ -42,6 +42,10 @@ public function process($connectionName, $job, WorkerOptions $options): void public function kill($status = 0, $options = null): void { + if ($this->supportsAsyncSignals()) { + $this->resetTimeoutHandler(); + } + parent::stop($status, $options); // When running tests, we cannot run exit because it will kill the PHPunit process.