mirror of
https://github.com/niusmallnan/steve.git
synced 2025-09-22 18:36:59 +00:00
lock to avoid panic
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user