aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar journey-c <32350836+journey-c@users.noreply.github.com> 2023-11-11 06:17:55 +0800
committerGravatar GitHub <noreply@github.com> 2023-11-10 14:17:55 -0800
commit7765aa87a46b82d5b63b885e8eef982cc795e600 (patch)
tree4fffbb21b01c2d5a8fefa34fc1afbf9462881bcd
parent8964fc2180124248e0e086e22cead744c35aa13c (diff)
downloadcoredns-7765aa87a46b82d5b63b885e8eef982cc795e600.tar.gz
coredns-7765aa87a46b82d5b63b885e8eef982cc795e600.tar.zst
coredns-7765aa87a46b82d5b63b885e8eef982cc795e600.zip
plugin/etcd: the etcd client adds the DialKeepAliveTime parameter (#6351)
-rw-r--r--plugin/etcd/setup.go5
1 files 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