Skip to content

Commit

Permalink
Support preferred protocol first for application service discovery.
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj committed Nov 3, 2024
1 parent 5d31900 commit 6ff20f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ private List<ProtocolServiceKey> getMatchedProtocolServiceKeys(InstanceAddressUR
return true;
} else { // if consumer side protocol is not specified, remove all extra protocols
if (needPreferred) {
return StringUtils.isNotEmpty(serviceInfo.getParameter(PREFERRED_PROTOCOL));
return serviceInfo.getProtocol().equals(serviceInfo.getParameter(PREFERRED_PROTOCOL));
} else {
return StringUtils.isEmpty(serviceInfo.getParameter(IS_EXTRA));
}
Expand Down

0 comments on commit 6ff20f4

Please sign in to comment.