run gossip updater first

This commit is contained in:
Asim Aslam 2018-12-19 19:04:44 +00:00
parent fae8c5eb4c
commit 8b54a850f7

View File

@ -579,14 +579,14 @@ func NewRegistry(opts ...registry.Option) registry.Registry {
watchers: make(map[string]chan *registry.Result),
}
// run the updater
go gossip.run()
// configure the gossiper
if err := configure(gossip, opts...); err != nil {
log.Fatalf("Error configuring registry: %v", err)
}
// run the updater
go gossip.run()
// wait for setup
<-time.After(gossip.interval * 2)