From 5705f452cc7ec75b120fff8c24dd2db1c0ed48cb Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 24 Mar 2024 18:26:59 +0200 Subject: [PATCH] update config folding --- example/config.json | 24 ++++++++++++------------ src/cli/document/crawl.php | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/example/config.json b/example/config.json index ea4b119..7cf3c6b 100644 --- a/example/config.json +++ b/example/config.json @@ -142,6 +142,18 @@ "error":true } }, + "network": + { + "check": + { + "enabled":true, + "timeout":5, + "socket": + { + "201:5eb5:f061:678e:7565:6338:c02c:5251":80 + } + } + }, "curl": { "connection": @@ -350,17 +362,5 @@ ] } } - }, - "network": - { - "check": - { - "enabled":true, - "timeout":5, - "socket": - { - "201:5eb5:f061:678e:7565:6338:c02c:5251":80 - } - } } } \ No newline at end of file diff --git a/src/cli/document/crawl.php b/src/cli/document/crawl.php index 6c161c5..a5999c0 100644 --- a/src/cli/document/crawl.php +++ b/src/cli/document/crawl.php @@ -66,11 +66,11 @@ if (false === sem_acquire($semaphore, true)) } // Check network connection -if ($config->network->check->enabled) +if ($config->cli->document->crawl->network->check->enabled) { $network = false; - foreach ($config->network->check->socket as $host => $port) + foreach ($config->cli->document->crawl->network->check->socket as $host => $port) { if ($config->cli->document->crawl->debug->level->notice) { @@ -82,7 +82,7 @@ if ($config->network->check->enabled) ); } - if (\Yggverse\Net\Socket::isOpen($host, $port, $config->network->check->timeout)) + if (\Yggverse\Net\Socket::isOpen($host, $port, $config->cli->document->crawl->network->check->timeout)) { if ($config->cli->document->crawl->debug->level->notice) {