We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8272096 commit efd3427Copy full SHA for efd3427
workspace/popjava/src/ch/icosys/popjava/core/system/POPSystem.java
@@ -214,6 +214,14 @@ public static InterfaceAddress getHostIP() {
214
return addr;
215
}
216
217
+
218
219
+ //Fallback to whatever we find
220
+ for(InterfaceAddress addr : networkInterface.getInterfaceAddresses()) {
221
+ if(addr.getAddress() instanceof Inet4Address) {
222
+ return addr;
223
+ }
224
225
}catch (SocketException e) {
226
e.printStackTrace();
227
}catch (UnknownHostException e) {
0 commit comments