kylixs commented on a change in pull request #8876:
URL: https://github.com/apache/dubbo/pull/8876#discussion_r715349147
##########
File path:
dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyClient.java
##########
@@ -127,6 +128,16 @@ protected void initChannel(SocketChannel ch) throws
Exception {
});
}
+ private boolean isFilteredAddress(String host) {
+ // filter local address
+ if (StringUtils.isEquals(NetUtils.getLocalHost(), host) ||
+ "localhost".equals(host) ||
Review comment:
I found this method to check whether is localhost:
`org.apache.dubbo.common.utils.NetUtils.isLocalHost()`
`StringUtils.equalsAny()` is essentially the same, checking each string
once for equality.
```java
public static boolean equalsAny(final CharSequence string, final
CharSequence... searchStrings) {
if (ArrayUtils.isNotEmpty(searchStrings)) {
for (final CharSequence next : searchStrings) {
if (equals(string, next)) {
return true;
}
}
}
return false;
}
```
--
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]