RagingSpud commented on code in PR #5856:
URL: https://github.com/apache/rocketmq/pull/5856#discussion_r1066024203
##########
common/src/main/java/org/apache/rocketmq/common/UtilAll.java:
##########
@@ -604,7 +606,7 @@ public static byte[] getIP() {
if (ipCheck(ipByte)) {
if (!isInternalIP(ipByte)) {
return ipByte;
- } else if (internalIP == null) {
+ } else if (internalIP == null || internalIP[0]
== (byte) 127) {
Review Comment:
If we only have lo interface,`internalIP == null || internalIP[0] == (byte)
127)` will be true,so it will set `internalIP` to localhost and return.
If we have lo and LAN ip,when it find the LAN ip,`internalIP == null ||
internalIP[0] == (byte) 127)` also will be true, so it will override the value
of `internalIP`.
Am I missing something?
--
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]