mirror of
https://github.com/rancher/steve.git
synced 2025-08-11 19:21:36 +00:00
Fix panic due to concurrent map writes (#669)
The same object is given to many HTTP request and they proceed to modify that object.
This commit is contained in:
parent
cf97607be5
commit
1157865ea3
@ -464,7 +464,7 @@ func (l *ListOptionIndexer) notifyEvent(eventType watch.EventType, oldObj any, o
|
|||||||
|
|
||||||
watcher.ch <- watch.Event{
|
watcher.ch <- watch.Event{
|
||||||
Type: eventType,
|
Type: eventType,
|
||||||
Object: obj.(runtime.Object),
|
Object: obj.(runtime.Object).DeepCopyObject(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
l.watchersLock.RUnlock()
|
l.watchersLock.RUnlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user