Skip to content

Commit

Permalink
fix shared data delete due to concurrent map writes (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijitWakchaure authored Dec 8, 2022
1 parent 04006cf commit 3e82312
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ func (s *SimpleSyncScope) GetValue(name string) (value interface{}, exists bool)

// Delete implements Scope.GetValue
func (s *SimpleSyncScope) Delete(name string) {
s.mutex.RLock()
s.mutex.Lock()
if delScope, ok := s.scope.(NeedsDelete); ok {
delScope.Delete(name)
}
s.mutex.RUnlock()
s.mutex.Unlock()
}

// SetValue implements Scope.SetValue
Expand Down

0 comments on commit 3e82312

Please sign in to comment.