Bladeren bron

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

master
tao.zhang Eric Zhao 5 jaren geleden
bovenliggende
commit
77932701b6
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  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 Bestand weergeven

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


Laden…
Annuleren
Opslaan