You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/03/26 07:42:01 UTC

[dubbo] branch 3.0 updated: makes latch volatile. (#7448)

This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new 453e0ca  makes latch volatile. (#7448)
453e0ca is described below

commit 453e0ca541911775d307b50fa0e5215e6ee144be
Author: 赵延 <10...@qq.com>
AuthorDate: Fri Mar 26 15:41:30 2021 +0800

    makes latch volatile. (#7448)
---
 .../java/org/apache/dubbo/registry/zookeeper/ZookeeperRegistry.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/ZookeeperRegistry.java b/dubbo-registry/dubbo-registry-zookeeper/src/main/java/org/apache/dubbo/registry/zookeeper/ZookeeperRegistry.java
index cb97892..ddfb48a 100644
--- a/dubbo-registry/dubbo-registry-zookeeper/src/main/java/org/apache/dubbo/registry/zookeeper/ZookeeperRegistry.java
+++ b/dubbo-registry/dubbo-registry-zookeeper/src/main/java/org/apache/dubbo/registry/zookeeper/ZookeeperRegistry.java
@@ -292,7 +292,7 @@ public class ZookeeperRegistry extends CacheableFailbackRegistry {
     private class RegistryChildListenerImpl implements ChildListener {
         private RegistryNotifier notifier;
         private long lastExecuteTime;
-        private CountDownLatch latch;
+        private volatile CountDownLatch latch;
 
         public RegistryChildListenerImpl(URL consumerUrl, String path, NotifyListener listener, CountDownLatch latch) {
             this.latch = latch;