plugin/etcd: the etcd client adds the DialKeepAliveTime parameter (#6351)
This commit is contained in:
parent
8964fc2180
commit
7765aa87a4
1 changed files with 3 additions and 2 deletions
|
@ -99,8 +99,9 @@ func etcdParse(c *caddy.Controller) (*Etcd, error) {
|
||||||
|
|
||||||
func newEtcdClient(endpoints []string, cc *tls.Config, username, password string) (*etcdcv3.Client, error) {
|
func newEtcdClient(endpoints []string, cc *tls.Config, username, password string) (*etcdcv3.Client, error) {
|
||||||
etcdCfg := etcdcv3.Config{
|
etcdCfg := etcdcv3.Config{
|
||||||
Endpoints: endpoints,
|
Endpoints: endpoints,
|
||||||
TLS: cc,
|
TLS: cc,
|
||||||
|
DialKeepAliveTime: etcdTimeout,
|
||||||
}
|
}
|
||||||
if username != "" && password != "" {
|
if username != "" && password != "" {
|
||||||
etcdCfg.Username = username
|
etcdCfg.Username = username
|
||||||
|
|
Loading…
Add table
Reference in a new issue