Add proper contexts with timeouts for etcd operations (#7097)

This fixes an issue of perceived hang when incorrect
unreachable URLs are specified in MINIO_ETCD_ENDPOINTS
variable.

Fixes #7096
This commit is contained in:
Harshavardhana
2019-01-18 23:06:45 +05:30
committed by kannappanr
parent 730ac5381c
commit 74c2048ea9
5 changed files with 56 additions and 33 deletions
+1
View File
@@ -242,6 +242,7 @@ func handleCommonEnvVars() {
return &cert, terr
}
}
globalEtcdClient, err = etcd.New(etcd.Config{
Endpoints: etcdEndpoints,
DialTimeout: defaultDialTimeout,