Skip to content

Commit 6710b45

Browse files
committed
子进程全部退出且 refork == false 时,退出 master 进程
1 parent 877aed9 commit 6710b45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Process.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ protected function waitAll()
142142
$this->log("[worker:$id $pid] process stopped with status $status");
143143
unset(static::$workers[$id]);
144144

145-
if (!static::$shutdown && $this->refork) {
145+
if ($this->refork && !static::$shutdown) {
146146
// refork
147147
$this->forkWorker($id);
148148
}
149149
}
150150

151-
if (static::$shutdown && empty(static::$workers)) {
151+
if (empty(static::$workers) && (static::$shutdown || $this->refork == false)) {
152152
break;
153153
}
154154
}

0 commit comments

Comments
 (0)