Add mutex lock to cleanupStaleStickySessions

Proxier.serviceMap is supposed to be guarded by the mutex
pull/6/head
Justin Santa Barbara 2015-05-19 09:11:05 -04:00
parent 10339d72b6
commit 2473a81412
1 changed files with 2 additions and 0 deletions

View File

@ -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)
}