mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-12 16:44:05 -08:00
fix the zookeper race (#4355)
Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
This commit is contained in:
parent
86239ee5a5
commit
0b93fd6d5e
|
@ -137,8 +137,11 @@ func NewDiscovery(
|
||||||
logger = log.NewNopLogger()
|
logger = log.NewNopLogger()
|
||||||
}
|
}
|
||||||
|
|
||||||
conn, _, err := zk.Connect(srvs, timeout)
|
conn, _, err := zk.Connect(
|
||||||
conn.SetLogger(treecache.NewZookeeperLogger(logger))
|
srvs, timeout,
|
||||||
|
func(c *zk.Conn) {
|
||||||
|
c.SetLogger(treecache.NewZookeeperLogger(logger))
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue