EarthChen commented on a change in pull request #8699:
URL: https://github.com/apache/dubbo/pull/8699#discussion_r703181785
##########
File path:
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/metadata/ServiceInstanceHostPortCustomizer.java
##########
@@ -56,11 +60,19 @@ public void customize(ServiceInstance serviceInstance) {
break;
}
}
+
+ if (host == null || port == -1) {
+ logger.warn("The default preferredProtocol \"" +
preferredProtocol + "\" is not found, fall back to the strategy that pick the
first found protocol. Please try to modify the config of
dubbo.application.protocol");
+ URL url = urls.iterator().next();
+ host = url.getHost();
+ port = url.getPort();
+ }
} else {
URL url = urls.iterator().next();
Review comment:
Set does not guarantee order
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]