Browse Source

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

master
tao.zhang Eric Zhao 5 years ago
parent
commit
77932701b6
1 changed files with 1 additions and 1 deletions
  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 View File

@@ -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() {


Loading…
Cancel
Save