qqq
This commit is contained in:
+2
-1
@@ -97,11 +97,12 @@ class HotReload extends BaseProcess
|
|||||||
Event::add($init, fn() => $this->check($init));
|
Event::add($init, fn() => $this->check($init));
|
||||||
Event::cycle(function () use ($init) {
|
Event::cycle(function () use ($init) {
|
||||||
$pid = (int)file_get_contents(storage('.swoole.pid'));
|
$pid = (int)file_get_contents(storage('.swoole.pid'));
|
||||||
|
var_dump($this->isStop());
|
||||||
if ($pid <= 0 || !Process::kill($pid, 0) || $this->isStop()) {
|
if ($pid <= 0 || !Process::kill($pid, 0) || $this->isStop()) {
|
||||||
Event::del($init);
|
Event::del($init);
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
// Event::wait();
|
Event::wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user