Skip to content

Commit

Permalink
Merge pull request micro#1014 from milosgajdos83/memreg-race
Browse files Browse the repository at this point in the history
Fix memory registry race
  • Loading branch information
asim committed Dec 3, 2019
2 parents bb1a135 + 2652335 commit 3fbba9f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions registry/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ func (m *Registry) ttlPrune() {
}

func (m *Registry) sendEvent(r *registry.Result) {
watchers := make([]*Watcher, 0, len(m.watchers))

m.RLock()
watchers := make([]*Watcher, 0, len(m.watchers))
for _, w := range m.watchers {
watchers = append(watchers, w)
}
Expand Down

0 comments on commit 3fbba9f

Please sign in to comment.