From 1e992a53b078bb4dbdf0dc1883e15b2f83c6c496 Mon Sep 17 00:00:00 2001 From: Matthias Hinrichs Date: Wed, 18 Feb 2026 01:23:39 +0100 Subject: [PATCH] refactor: Increase ping host timeout to 2 seconds and remove the `-W 1` argument. --- server-actions/server_actions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server-actions/server_actions.go b/server-actions/server_actions.go index 6a5d5d7..663a1a2 100644 --- a/server-actions/server_actions.go +++ b/server-actions/server_actions.go @@ -97,10 +97,10 @@ func CheckServersStatus(servers []Server) { func PingHost(host string) bool { LogDebug("Pinging host: %s", host) - ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) defer cancel() - cmd := exec.CommandContext(ctx, "ping", "-c", "1", "-W", "1", host) + cmd := exec.CommandContext(ctx, "ping", "-c", "1", host) err := cmd.Run() if err != nil {