panic vs. deadlock
This commit is contained in:
parent
edd5d0a13d
commit
125512eb82
|
|
@ -1033,9 +1033,8 @@ func (c *Cluster) processPodEvent(obj interface{}) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
c.podSubscribersMu.RLock()
|
c.podSubscribersMu.RLock()
|
||||||
defer c.podSubscribersMu.RUnlock()
|
|
||||||
|
|
||||||
subscriber, ok := c.podSubscribers[spec.NamespacedName(event.PodName)]
|
subscriber, ok := c.podSubscribers[spec.NamespacedName(event.PodName)]
|
||||||
|
c.podSubscribersMu.RUnlock()
|
||||||
if ok {
|
if ok {
|
||||||
subscriber <- event
|
subscriber <- event
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -324,7 +324,7 @@ func testNil(values ...*int32) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToIntStr convert int to IntOrString type
|
// ToIntStr converts int to IntOrString type
|
||||||
func ToIntStr(val int) *intstr.IntOrString {
|
func ToIntStr(val int) *intstr.IntOrString {
|
||||||
b := intstr.FromInt(val)
|
b := intstr.FromInt(val)
|
||||||
return &b
|
return &b
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue