Ver código fonte

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

master
tao.zhang Eric Zhao 5 anos atrás
pai
commit
77932701b6
1 arquivos alterados com 1 adições e 1 exclusões
  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 Ver arquivo

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


Carregando…
Cancelar
Salvar