diff --git a/sentinel-core/src/main/java/com/alibaba/csp/sentinel/property/DynamicSentinelProperty.java b/sentinel-core/src/main/java/com/alibaba/csp/sentinel/property/DynamicSentinelProperty.java index b432df71..94648d4a 100755 --- a/sentinel-core/src/main/java/com/alibaba/csp/sentinel/property/DynamicSentinelProperty.java +++ b/sentinel-core/src/main/java/com/alibaba/csp/sentinel/property/DynamicSentinelProperty.java @@ -15,15 +15,14 @@ */ package com.alibaba.csp.sentinel.property; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; - import com.alibaba.csp.sentinel.log.RecordLog; +import java.util.Set; +import java.util.concurrent.CopyOnWriteArraySet; + public class DynamicSentinelProperty implements SentinelProperty { - protected Set> listeners = Collections.synchronizedSet(new HashSet>()); + protected Set> listeners = new CopyOnWriteArraySet<>(); private T value = null; public DynamicSentinelProperty() {