Improve speed and reliability of host detection

This commit is contained in:
Cameron Gutman 2015-07-10 12:18:09 -07:00
commit b01d13976b
2 changed files with 64 additions and 18 deletions

View file

@ -444,8 +444,15 @@ static NSArray* appList;
// Initialize the non-persistent host state
for (Host* host in hostList) {
host.online = NO;
host.activeAddress = host.address;
if (host.activeAddress == nil) {
host.activeAddress = host.localAddress;
}
if (host.activeAddress == nil) {
host.activeAddress = host.externalAddress;
}
if (host.activeAddress == nil) {
host.activeAddress = host.address;
}
}
}
}