ARTEMIS-3853 Fix default ping command IPv6 for Windows

This commit is contained in:
Domenico Francesco Bruscino 2022-06-07 14:02:53 +02:00 committed by clebertsuconic
parent 1223f4fb03
commit 8d27f3e333
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
private final Set<URL> urls = new ConcurrentHashSet<>();
private NetworkInterface networkInterface;
public static final String IPV6_DEFAULT_COMMAND = "ping6 -c 1 %2$s";
public static final String IPV6_DEFAULT_COMMAND = Env.isWindowsOs() ? "ping -n 1 -w %d %s" : "ping6 -c 1 %2$s";
public static final String IPV4_DEFAULT_COMMAND = Env.isMacOs() ? "ping -c 1 -t %d %s" : Env.isWindowsOs() ? "cmd /C ping -n 1 -w %d %s | findstr /i TTL" : "ping -c 1 -w %d %s";