From 7765aa87a46b82d5b63b885e8eef982cc795e600 Mon Sep 17 00:00:00 2001 From: journey-c <32350836+journey-c@users.noreply.github.com> Date: Sat, 11 Nov 2023 06:17:55 +0800 Subject: [PATCH] plugin/etcd: the etcd client adds the DialKeepAliveTime parameter (#6351) --- plugin/etcd/setup.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/etcd/setup.go b/plugin/etcd/setup.go index bd81af513..0f70df5bc 100644 --- a/plugin/etcd/setup.go +++ b/plugin/etcd/setup.go @@ -99,8 +99,9 @@ func etcdParse(c *caddy.Controller) (*Etcd, error) { func newEtcdClient(endpoints []string, cc *tls.Config, username, password string) (*etcdcv3.Client, error) { etcdCfg := etcdcv3.Config{ - Endpoints: endpoints, - TLS: cc, + Endpoints: endpoints, + TLS: cc, + DialKeepAliveTime: etcdTimeout, } if username != "" && password != "" { etcdCfg.Username = username