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 2023/01/05 12:46:09 UTC

[dubbo] branch 3.1 updated: Fix app level configuration not work (#11215)

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

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


The following commit(s) were added to refs/heads/3.1 by this push:
     new d66349f982 Fix app level configuration not work (#11215)
d66349f982 is described below

commit d66349f982e6668873f0edcec5d0bc8c6c28b97f
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Thu Jan 5 20:45:59 2023 +0800

    Fix app level configuration not work (#11215)
---
 .../org/apache/dubbo/registry/integration/RegistryProtocol.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
index d7ce4f1ba4..ff1e66d176 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
@@ -230,8 +230,8 @@ public class RegistryProtocol implements Protocol, ScopeModelAware {
         //  subscription information to cover.
         final URL overrideSubscribeUrl = getSubscribedOverrideUrl(providerUrl);
         final OverrideListener overrideSubscribeListener = new OverrideListener(overrideSubscribeUrl, originInvoker);
-        Map<URL, NotifyListener> overrideListeners = getProviderConfigurationListener(providerUrl).getOverrideListeners();
-        overrideListeners.put(registryUrl, overrideSubscribeListener);
+        Map<URL, NotifyListener> overrideListeners = getProviderConfigurationListener(overrideSubscribeUrl).getOverrideListeners();
+        overrideListeners.put(overrideSubscribeUrl, overrideSubscribeListener);
 
         providerUrl = overrideUrlWithConfig(providerUrl, overrideSubscribeListener);
         //export invoker
@@ -898,7 +898,7 @@ public class RegistryProtocol implements Protocol, ScopeModelAware {
             try {
                 if (subscribeUrl != null) {
                     Map<URL, NotifyListener> overrideListeners = getProviderConfigurationListener(subscribeUrl).getOverrideListeners();
-                    NotifyListener listener = overrideListeners.remove(registerUrl);
+                    NotifyListener listener = overrideListeners.remove(subscribeUrl);
                     if (listener != null) {
                         if (!registry.isServiceDiscovery()) {
                             registry.unsubscribe(subscribeUrl, listener);