From 2473a814121eb17146e51f06df4ff94648e2684d Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Tue, 19 May 2015 09:11:05 -0400 Subject: [PATCH] Add mutex lock to cleanupStaleStickySessions Proxier.serviceMap is supposed to be guarded by the mutex --- pkg/proxy/proxier.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/proxy/proxier.go b/pkg/proxy/proxier.go index 6984d83510a..7df0cac9ec4 100644 --- a/pkg/proxy/proxier.go +++ b/pkg/proxy/proxier.go @@ -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) }