From 7e91eabeca524dcf79876a081ae2408ff395ce05 Mon Sep 17 00:00:00 2001 From: Ben Adrian Sarmiento Date: Sun, 16 Jun 2024 21:17:36 +0200 Subject: [PATCH] Use 5 sec timeout for network test --- pkg/http/ip.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/http/ip.go b/pkg/http/ip.go index d27334b..d952c05 100644 --- a/pkg/http/ip.go +++ b/pkg/http/ip.go @@ -183,7 +183,7 @@ func (r *IPRepository) testDomainLatency(client *HTTPClient, domain string) (flo var totalDuration float64 var retErr error for i := 0; i < iterations; i++ { - ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() req, err := http.NewRequestWithContext(ctx, http.MethodGet, testURL, nil)