Skip to content

Commit

Permalink
https://github.com/uavorg/uavstack/issues/469
Browse files Browse the repository at this point in the history
预警策略管理先判断获取的新策略是否为空,不空则清空当前策略情况,在预警策略短时间删除后,由于新策略为空,导致不会清空内存中的策略
现调整判断和清空的顺序
  • Loading branch information
fyb007 committed Dec 28, 2018
1 parent 57f7445 commit 5a7c282
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,6 @@ public void run() {

Map<String, String> strategyMap = cm.getHashAll(UAV_CACHE_REGION, RT_STRATEGY_KEY);

if (null == strategyMap || strategyMap.isEmpty()) {
return;
}

try {
strategyLock.lockInterruptibly();

Expand All @@ -232,6 +228,10 @@ public void run() {
multiInsts.clear();
strategies.clear();

if (null == strategyMap || strategyMap.isEmpty()) {
return;
}

for (String key : strategyMap.keySet()) {
String json = strategyMap.get(key);
NotifyStrategy stra = new NotifyStrategy(key, json);
Expand Down

0 comments on commit 5a7c282

Please sign in to comment.