Use 5 sec timeout for network test
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user