Skip to content

Commit 004ba1c

Browse files
Merge pull request #165 from stackkit/bugfix/reset-pcntl-alarm
Reset pcntl alarm when application is killed too
2 parents 50b226e + 828880c commit 004ba1c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Worker.php

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public function process($connectionName, $job, WorkerOptions $options): void
4242

4343
public function kill($status = 0, $options = null): void
4444
{
45+
if ($this->supportsAsyncSignals()) {
46+
$this->resetTimeoutHandler();
47+
}
48+
4549
parent::stop($status, $options);
4650

4751
// When running tests, we cannot run exit because it will kill the PHPunit process.

0 commit comments

Comments
 (0)