This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new 667bc8c Use volatile to modify variables to ensure visibility (#7689)
667bc8c is described below
commit 667bc8c866d29aa24ef259aeaf23d6b84c80603e
Author: 灼华 <[email protected]>
AuthorDate: Tue May 11 09:56:12 2021 +0800
Use volatile to modify variables to ensure visibility (#7689)
---
.../registry/zookeeper/ZookeeperServiceDiscoveryChangeWatcher.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/dubbo-registry/dubbo-registry-zookeeper/src/main/java/org/apache/dubbo/registry/zookeeper/ZookeeperServiceDiscoveryChangeWatcher.java
b/dubbo-registry/dubbo-registry-zookeeper/src/main/java/org/apache/dubbo/registry/zookeeper/ZookeeperServiceDiscoveryChangeWatcher.java
index 1e8f171..e01e863 100644
---
a/dubbo-registry/dubbo-registry-zookeeper/src/main/java/org/apache/dubbo/registry/zookeeper/ZookeeperServiceDiscoveryChangeWatcher.java
+++
b/dubbo-registry/dubbo-registry-zookeeper/src/main/java/org/apache/dubbo/registry/zookeeper/ZookeeperServiceDiscoveryChangeWatcher.java
@@ -39,7 +39,7 @@ public class ZookeeperServiceDiscoveryChangeWatcher
implements CuratorWatcher {
private final ZookeeperServiceDiscovery zookeeperServiceDiscovery;
- private boolean keepWatching = true;
+ private volatile boolean keepWatching = true;
private final String serviceName;