fix the zookeper race (#4355)
Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
This commit is contained in:
parent
9fe8bcf4be
commit
a155b6d29d
|
@ -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 New Issue