mirror of
https://github.com/correl/mage.git
synced 2025-03-17 01:06:26 -09:00
fixed Issue 243
This commit is contained in:
parent
f5c3494723
commit
d7e6b4560c
1 changed files with 7 additions and 6 deletions
|
@ -183,12 +183,13 @@ public class Connection {
|
||||||
NetworkInterface iface = interfaces.nextElement( );
|
NetworkInterface iface = interfaces.nextElement( );
|
||||||
if (iface.isLoopback())
|
if (iface.isLoopback())
|
||||||
continue;
|
continue;
|
||||||
for (InterfaceAddress addr: iface.getInterfaceAddresses())
|
for (InterfaceAddress addr: iface.getInterfaceAddresses()) {
|
||||||
{
|
if (addr != null) {
|
||||||
InetAddress iaddr = addr.getAddress();
|
InetAddress iaddr = addr.getAddress();
|
||||||
if (iaddr instanceof Inet4Address) {
|
if (iaddr != null && iaddr instanceof Inet4Address) {
|
||||||
return iaddr;
|
return iaddr;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue