Skip to content

Commit efd3427

Browse files
committed
Workaround
1 parent 8272096 commit efd3427

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

workspace/popjava/src/ch/icosys/popjava/core/system/POPSystem.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,14 @@ public static InterfaceAddress getHostIP() {
214214
return addr;
215215
}
216216
}
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+
}
217225
}catch (SocketException e) {
218226
e.printStackTrace();
219227
}catch (UnknownHostException e) {

0 commit comments

Comments
 (0)