mirror of https://github.com/k3s-io/k3s
Add mutex lock to cleanupStaleStickySessions
Proxier.serviceMap is supposed to be guarded by the mutexpull/6/head
parent
10339d72b6
commit
2473a81412
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue