Cacher stopLock should be unlocked

Kubernetes-commit: 42b01beaca349200cc5c8dbf20e70faa7ae2c27a
This commit is contained in:
hzxuzhonghu 2017-12-19 11:18:15 +08:00 committed by Kubernetes Publisher
parent e487d10a46
commit ea4a684350
1 changed files with 1 additions and 1 deletions

View File

@ -655,7 +655,7 @@ func (c *Cacher) Stop() {
} }
c.stopLock.Lock() c.stopLock.Lock()
if c.stopped { if c.stopped {
// avoid that it was locked meanwhile as isStopped only read-locks c.stopLock.Unlock()
return return
} }
c.stopped = true c.stopped = true