refactor: Increase ping host timeout to 2 seconds and remove the -W 1 argument.
Build Docker Container using Multistage Build / build (push) Failing after 23s
Build Docker Container using Multistage Build / build (push) Failing after 23s
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user