Set host online immediately after using Add PC dialog to update host address

This commit is contained in:
Cameron Gutman
2018-12-28 00:54:26 -08:00
parent 90e582a263
commit eca018ad15

View File

@@ -117,6 +117,12 @@
TemporaryHost *existingHost = [self getHostInDiscovery:host.uuid];
if (existingHost != nil) {
// NB: Our logic here depends on the fact that we never propagate
// the entire TemporaryHost to existingHost. In particular, when mDNS
// discovers a PC and we poll it, we will do so over HTTP which will
// not have accurate pair state. The fields explicitly copied below
// are accurate though.
// Update address of existing host
if (host.address != nil) {
existingHost.address = host.address;
@@ -128,6 +134,9 @@
existingHost.externalAddress = host.externalAddress;
}
existingHost.activeAddress = host.activeAddress;
// Set the host online now
existingHost.online = YES;
return NO;
}
else {