We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0889c3e commit cf70653Copy full SHA for cf70653
pkg/proxy/userspace/roundrobin.go
@@ -122,8 +122,8 @@ func isSessionAffinity(affinity *affinityPolicy) bool {
122
123
// ServiceHasEndpoints checks whether a service entry has endpoints.
124
func (lb *LoadBalancerRR) ServiceHasEndpoints(svcPort proxy.ServicePortName) bool {
125
- lb.lock.Lock()
126
- defer lb.lock.Unlock()
+ lb.lock.RLock()
+ defer lb.lock.RUnlock()
127
state, exists := lb.services[svcPort]
128
// TODO: while nothing ever assigns nil to the map, *some* of the code using the map
129
// checks for it. The code should all follow the same convention.
0 commit comments