mirror of https://github.com/k3s-io/k3s
commit
a949abc5bd
|
@ -122,8 +122,8 @@ func isSessionAffinity(affinity *affinityPolicy) bool {
|
|||
|
||||
// ServiceHasEndpoints checks whether a service entry has endpoints.
|
||||
func (lb *LoadBalancerRR) ServiceHasEndpoints(svcPort proxy.ServicePortName) bool {
|
||||
lb.lock.Lock()
|
||||
defer lb.lock.Unlock()
|
||||
lb.lock.RLock()
|
||||
defer lb.lock.RUnlock()
|
||||
state, exists := lb.services[svcPort]
|
||||
// TODO: while nothing ever assigns nil to the map, *some* of the code using the map
|
||||
// checks for it. The code should all follow the same convention.
|
||||
|
|
Loading…
Reference in New Issue