This commit is contained in:
xl
2024-11-18 11:32:40 +08:00
parent 82ff5c5d42
commit 9cb6db5e26
+9
View File
@@ -3,6 +3,7 @@
namespace Kiri\Server\Abstracts;
use Kiri\Server\ServerInterface;
use Psr\Log\LoggerInterface;
use Swoole\Process;
use Kiri\Server\Processes\AbstractProcess;
use function GuzzleHttp\Psr7\uri_for;
@@ -11,6 +12,9 @@ class HotReload extends AbstractProcess
{
/**
* @var mixed
*/
protected mixed $pipe;
@@ -26,6 +30,9 @@ class HotReload extends AbstractProcess
protected bool $enable_queue = false;
/**
* @var bool
*/
protected bool $reloading = false;
@@ -76,6 +83,8 @@ class HotReload extends AbstractProcess
{
$this->reloading = true;
\Kiri::getLogger()->info('reloading server, please waite.');
di(ServerInterface::class)->reload();
$this->reloading = false;