This is an automated email from the ASF dual-hosted git repository.
haoyann pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git
The following commit(s) were added to refs/heads/develop by this push:
new 02d36df [Fix bug](#908) (#910)
02d36df is described below
commit 02d36dfaab1136a7c3053d9cbf1caf971f7f1d43
Author: sherl0ckLiu <[email protected]>
AuthorDate: Tue Jun 28 19:36:20 2022 +0800
[Fix bug](#908) (#910)
---
.../java/org/apache/dubbo/admin/service/RegistryServerSync.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/RegistryServerSync.java
b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/RegistryServerSync.java
index 3e66694..886c5b6 100644
---
a/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/RegistryServerSync.java
+++
b/dubbo-admin-server/src/main/java/org/apache/dubbo/admin/service/RegistryServerSync.java
@@ -98,7 +98,12 @@ public class RegistryServerSync implements DisposableBean,
NotifyListener {
for (URL url : urls) {
String category =
url.getUrlParam().getParameter(Constants.CATEGORY_KEY);
if (category == null) {
- category = Constants.PROVIDERS_CATEGORY;
+ // Assign an initial value to category according to the
information in url
+ if (Constants.CONSUMER_SIDE.equals(url.getSide()) ||
Constants.CONSUMER_PROTOCOL.equals(url.getProtocol())) {
+ category = Constants.CONSUMERS_CATEGORY;
+ } else {
+ category = Constants.PROVIDERS_CATEGORY;
+ }
}
// NOTE: group and version in empty protocol is *
if (Constants.EMPTY_PROTOCOL.equalsIgnoreCase(url.getProtocol())) {