Skip to content

Commit 70ec90d

Browse files
authored
#1431: here is a StackOverflow bug? dubbo version 2.5.9, FailsafeLogger.appendContextMessage() > NetUtils.getLocalAddress() (#1912)
1 parent 0c6346f commit 70ec90d

File tree

1 file changed

+4
-5
lines changed
  • dubbo-common/src/main/java/com/alibaba/dubbo/common/utils

1 file changed

+4
-5
lines changed

dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ private static InetAddress getLocalAddress0() {
190190
return localAddress;
191191
}
192192
} catch (Throwable e) {
193-
logger.warn("Failed to retrieving ip address, " + e.getMessage(), e);
193+
logger.warn(e);
194194
}
195195
try {
196196
Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
@@ -207,19 +207,18 @@ private static InetAddress getLocalAddress0() {
207207
return address;
208208
}
209209
} catch (Throwable e) {
210-
logger.warn("Failed to retrieving ip address, " + e.getMessage(), e);
210+
logger.warn(e);
211211
}
212212
}
213213
}
214214
} catch (Throwable e) {
215-
logger.warn("Failed to retrieving ip address, " + e.getMessage(), e);
215+
logger.warn(e);
216216
}
217217
}
218218
}
219219
} catch (Throwable e) {
220-
logger.warn("Failed to retrieving ip address, " + e.getMessage(), e);
220+
logger.warn(e);
221221
}
222-
logger.error("Could not get local host ip address, will use 127.0.0.1 instead.");
223222
return localAddress;
224223
}
225224

0 commit comments

Comments
 (0)