mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 07:34:04 -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()
|
||||
}
|
||||
|
||||
conn, _, err := zk.Connect(srvs, timeout)
|
||||
conn.SetLogger(treecache.NewZookeeperLogger(logger))
|
||||
conn, _, err := zk.Connect(
|
||||
srvs, timeout,
|
||||
func(c *zk.Conn) {
|
||||
c.SetLogger(treecache.NewZookeeperLogger(logger))
|
||||
})
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue