grpcproxy: lock store when getting size

Fixes data race in proxy integration tests.
This commit is contained in:
Anthony Romano 2016-12-05 13:29:57 -08:00
parent 40f0193c4c
commit 62398954e4

View File

@ -157,5 +157,7 @@ func (c *cache) Compact(revision int64) {
}
func (c *cache) Size() int {
c.mu.RLock()
defer c.mu.RUnlock()
return c.lru.Len()
}