You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2021/02/05 16:04:50 UTC
[dubbo] branch 2.7.9-release updated: Handle scenario where
serviceDiscoveryInvoker is null (#7133)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 2.7.9-release
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/2.7.9-release by this push:
new 970c475 Handle scenario where serviceDiscoveryInvoker is null (#7133)
970c475 is described below
commit 970c475429b40197c6386c16eee408a79403da31
Author: gongdewei <ky...@qq.com>
AuthorDate: Fri Feb 5 10:04:24 2021 -0600
Handle scenario where serviceDiscoveryInvoker is null (#7133)
---
.../registry/integration/InterfaceCompatibleRegistryProtocol.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/InterfaceCompatibleRegistryProtocol.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/InterfaceCompatibleRegistryProtocol.java
index 9bc0bd4..0a06762 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/InterfaceCompatibleRegistryProtocol.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/InterfaceCompatibleRegistryProtocol.java
@@ -149,6 +149,9 @@ public class InterfaceCompatibleRegistryProtocol extends RegistryProtocol {
@Override
public boolean isAvailable() {
+ if (serviceDiscoveryInvoker == null) {
+ return invoker.isAvailable();
+ }
return invoker.isAvailable() || serviceDiscoveryInvoker.isAvailable();
}
@@ -174,6 +177,9 @@ public class InterfaceCompatibleRegistryProtocol extends RegistryProtocol {
@Override
public boolean isDestroyed() {
+ if (serviceDiscoveryInvoker == null) {
+ return invoker.isDestroyed();
+ }
return invoker.isDestroyed() && serviceDiscoveryInvoker.isDestroyed();
}
}