run gossip updater first
This commit is contained in:
		| @@ -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) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user