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.
|
// clean up any stale sticky session records in the hash map.
|
||||||
func (proxier *Proxier) cleanupStaleStickySessions() {
|
func (proxier *Proxier) cleanupStaleStickySessions() {
|
||||||
|
proxier.mu.Lock()
|
||||||
|
defer proxier.mu.Unlock()
|
||||||
for name := range proxier.serviceMap {
|
for name := range proxier.serviceMap {
|
||||||
proxier.loadBalancer.CleanupStaleStickySessions(name)
|
proxier.loadBalancer.CleanupStaleStickySessions(name)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user