From 8ab9e3ec0b773309d9f68f746867b9917cd85430 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Tue, 2 Aug 2016 13:36:31 +0000 Subject: [PATCH] discovery: increase default connection timeout This commit increases default connection timeout from 5s to 20s, in order to gracefully accomodate for retrials. This will help in overcoming soft-failure cases, like skipping a single faulty resolvers in resolv.conf. This is still a quite aggressive timeout, well below the Linux timeout of 127s for new TCP connections. --- discovery/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discovery/http.go b/discovery/http.go index b6ed644b..7f30e668 100644 --- a/discovery/http.go +++ b/discovery/http.go @@ -28,7 +28,7 @@ import ( type InsecureOption int const ( - defaultDialTimeout = 5 * time.Second + defaultDialTimeout = 20 * time.Second ) const (