浏览代码

Add volatile for the stop flag of watcher in ConsulDataSource (#1054)

master
tao.zhang Eric Zhao 5 年前
父节点
当前提交
77932701b6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      sentinel-extension/sentinel-datasource-consul/src/main/java/com/alibaba/csp/sentinel/datasource/consul/ConsulDataSource.java

+ 1
- 1
sentinel-extension/sentinel-datasource-consul/src/main/java/com/alibaba/csp/sentinel/datasource/consul/ConsulDataSource.java 查看文件

@@ -133,7 +133,7 @@ public class ConsulDataSource<T> extends AbstractDataSource<String, T> {
}

private class ConsulKVWatcher implements Runnable {
private boolean running = true;
private volatile boolean running = true;

@Override
public void run() {


正在加载...
取消
保存