Pārlūkot izejas kodu

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

master
tao.zhang Eric Zhao pirms 5 gadiem
vecāks
revīzija
77932701b6
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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 Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt