Skip to content

Commit 9edba68

Browse files
Prophet777andig
authored andcommitted
Fix server shutdown when all worker are crashed (php-pm#422)
1 parent 701be3d commit 9edba68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ProcessManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public function shutdown($graceful = true)
256256
$this->output->writeln("<info>Server is shutting down.</info>");
257257
$this->status = self::STATE_SHUTDOWN;
258258

259-
$remainingSlaves = $this->slaveCount;
259+
$remainingSlaves = count($this->slaves->getByStatus(Slave::READY));
260260

261261
if ($remainingSlaves === 0) {
262262
// if for some reason there are no workers, the close callback won't do anything, so just quit.

0 commit comments

Comments
 (0)