mirror of
https://github.com/go-micro/go-micro.git
synced 2025-10-06 21:46:55 +02:00
fix data race in memory.update (#2802)
Co-authored-by: ExtinctPatronageDeodorize <ExtinctPatronageDeodorize@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
479bd58c3f
commit
e5cd820c71
@@ -183,10 +183,12 @@ func (m *memory) update() {
|
||||
|
||||
val, _ := vals.Get(w.path...)
|
||||
|
||||
m.RLock()
|
||||
uv := updateValue{
|
||||
version: m.snap.Version,
|
||||
value: val,
|
||||
}
|
||||
m.RUnlock()
|
||||
|
||||
select {
|
||||
case w.updates <- uv:
|
||||
|
Reference in New Issue
Block a user