We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f69a618 commit 5f21dd7Copy full SHA for 5f21dd7
1 file changed
utils/etcd.go
@@ -14,6 +14,7 @@ import (
14
15
var etcdClient *clientv3.Client = nil
16
var clientMutex sync.Mutex
17
+var startedConnMonitor bool
18
19
func GetEtcdClient() (*clientv3.Client, error) {
20
clientMutex.Lock()
@@ -37,7 +38,10 @@ func GetEtcdClient() (*clientv3.Client, error) {
37
38
39
etcdClient = cli
40
- startConnectionMonitor(etcdClient)
41
+ if !startedConnMonitor {
42
+ startConnectionMonitor(etcdClient)
43
+ startedConnMonitor = true
44
+ }
45
46
return cli, nil
47
}
0 commit comments