Skip to content

Commit f127e26

Browse files
sschepensjakubdyszkiewicz
authored andcommitted
make setSnapshot synchronized
Signed-off-by: Sebastian Schepens <[email protected]>
1 parent 05d2bfc commit f127e26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cache/src/main/java/io/envoyproxy/controlplane/cache/SimpleCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public Collection<T> groups() {
196196
* {@inheritDoc}
197197
*/
198198
@Override
199-
public void setSnapshot(T group, Snapshot snapshot) {
199+
public synchronized void setSnapshot(T group, Snapshot snapshot) {
200200
// we take a writeLock to prevent watches from being created while we update the snapshot
201201
CacheStatusInfo<T> status;
202202
writeLock.lock();

0 commit comments

Comments
 (0)