mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
Add mutex lock to cleanupStaleStickySessions
Proxier.serviceMap is supposed to be guarded by the mutex
This commit is contained in:
@@ -154,6 +154,8 @@ func (proxier *Proxier) ensurePortals() {
|
||||
|
||||
// clean up any stale sticky session records in the hash map.
|
||||
func (proxier *Proxier) cleanupStaleStickySessions() {
|
||||
proxier.mu.Lock()
|
||||
defer proxier.mu.Unlock()
|
||||
for name := range proxier.serviceMap {
|
||||
proxier.loadBalancer.CleanupStaleStickySessions(name)
|
||||
}
|
||||
|
Reference in New Issue
Block a user