改名
This commit is contained in:
@@ -66,10 +66,10 @@ class FileChangeCustomProcess extends Command
|
|||||||
|
|
||||||
$this->trigger_reload();
|
$this->trigger_reload();
|
||||||
Coroutine::create(function () use ($driver) {
|
Coroutine::create(function () use ($driver) {
|
||||||
Coroutine::create(function () {
|
Coroutine::create(function () use ($driver) {
|
||||||
$waite = Coroutine::waitSignal(SIGTERM | SIGKILL);
|
$waite = Coroutine::waitSignal(SIGTERM | SIGKILL);
|
||||||
if ($waite) {
|
if ($waite) {
|
||||||
$this->stop();
|
$this->stop($driver);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$driver->start();
|
$driver->start();
|
||||||
@@ -81,8 +81,9 @@ class FileChangeCustomProcess extends Command
|
|||||||
/**
|
/**
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function stop(): void
|
private function stop($driver): void
|
||||||
{
|
{
|
||||||
|
$driver->clear();
|
||||||
if (!file_exists(storage('.swoole.pid'))) {
|
if (!file_exists(storage('.swoole.pid'))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,12 @@ class Inotify
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function clear()
|
||||||
|
{
|
||||||
|
Event::del($this->inotify);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开始监听
|
* 开始监听
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user