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/06/03 08:47:11 UTC

[dubbo] branch master updated: Consider the status of forbidden when checking that the registry is available (#7946)

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 e18d4d0  Consider the status of forbidden when checking that the registry is available (#7946)
e18d4d0 is described below

commit e18d4d0085e9e692f6c3af6ab1f526112a3ead4b
Author: Haichao <52...@qq.com>
AuthorDate: Thu Jun 3 16:46:55 2021 +0800

    Consider the status of forbidden when checking that the registry is available (#7946)
---
 .../java/org/apache/dubbo/registry/integration/RegistryDirectory.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
index 9323667..6e2ab5a 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
@@ -459,7 +459,7 @@ public class RegistryDirectory<T> extends DynamicDirectory<T> {
         }
         Map<URL, Invoker<T>> localUrlInvokerMap = urlInvokerMap;
         try {
-            if (CollectionUtils.isNotEmptyMap(localUrlInvokerMap)
+            if (!forbidden && CollectionUtils.isNotEmptyMap(localUrlInvokerMap)
                     && localUrlInvokerMap.values().stream().anyMatch(Invoker::isAvailable)) {
                 return true;
             }