1
0
mirror of https://github.com/rancher/steve.git synced 2025-06-24 05:57:34 +00:00

lock to avoid panic

This commit is contained in:
Darren Shepherd 2020-02-03 11:30:34 -07:00
parent 139bacf74d
commit a32064f238

View File

@ -228,7 +228,9 @@ func (h *clusterCache) start() {
} }
event := eventObj.(event) event := eventObj.(event)
h.RLock()
w := h.watchers[event.gvr] w := h.watchers[event.gvr]
h.RUnlock()
if w == nil { if w == nil {
continue continue
} }