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) {