Skip to content

Commit b6eb14d

Browse files
authored
Add traceroute to fullCheck
1 parent f69d9a5 commit b6eb14d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/CheckHost.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,20 +348,22 @@ public function fullCheck(string $host_name): array|false {
348348
$tcp_id = $this->sendRequest($host_name, 'tcp');
349349
$udp_id = $this->sendRequest($host_name, 'udp');
350350
$dns_id = $this->sendRequest($host_name, 'dns');
351+
$traceroute_id = $this->sendRequest($host_name, 'traceroute');
351352

352353
$ping = $this->getResults($ping_id);
353354
$http = $this->getResults($http_id);
354355
$tcp = $this->getResults($tcp_id);
355356
$udp = $this->getResults($udp_id);
356357
$dns = $this->getResults($dns_id);
358+
$traceroute = $this->getResults($traceroute_id);
357359

358-
if (empty($ping) && empty($http) && empty($tcp) && empty($udp) && empty($dns)) {
360+
if (empty($ping) && empty($http) && empty($tcp) && empty($udp) && empty($dns) && empty($traceroute)) {
359361
return false;
360362
}
361363

362364
$result = [];
363365
foreach ($this->nodes as $node_value) {
364-
foreach (['ping', 'http', 'tcp', 'udp', 'dns'] as $check_type) {
366+
foreach (['ping', 'http', 'tcp', 'udp', 'dns', 'traceroute'] as $check_type) {
365367
$result[$node_value[0]['location']['country_name']][$check_type] =
366368
${$check_type}['results'][$node_value[0]['location']['country_name']] ?? null;
367369
}

0 commit comments

Comments
 (0)