Specify ipv4 for ping as the dns resolv of ping may default to ipv6 unless specified.

This commit is contained in:
Kim-Eirik Karlsen 2022-12-27 00:23:52 +01:00
parent f968ffcf61
commit 8267094825
No known key found for this signature in database
GPG key ID: DDEB38C2C40B3B83

View file

@ -167,7 +167,7 @@ class LookingGlass
*/ */
public static function ping(string $host, int $count = 4): bool public static function ping(string $host, int $count = 4): bool
{ {
return self::procExecute('ping -c' . $count . ' -w15', $host); return self::procExecute('ping -4 -c' . $count . ' -w15', $host);
} }
/** /**