Use more aggressive mDNS querying for faster PC discovery, particularly in newly online PC scenarios

This commit is contained in:
Cameron Gutman
2018-06-01 20:23:39 -07:00
parent 862b8632e3
commit 236c9d5c6e
2 changed files with 31 additions and 16 deletions
+3 -3
View File
@@ -162,15 +162,15 @@
- (void)updateHost:(TemporaryHost*)host {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// Discover the hosts before adding to eliminate duplicates
Log(LOG_I, @"Found host through MDNS: %@:", host.name);
Log(LOG_D, @"Found host through MDNS: %@:", host.name);
// Since this is on a background thread, we do not need to use the opQueue
DiscoveryWorker* worker = (DiscoveryWorker*)[self createWorkerForHost:host];
[worker discoverHost];
if ([self addHostToDiscovery:host]) {
Log(LOG_D, @"Adding host to discovery: %@", host.name);
Log(LOG_I, @"Found new host through MDNS: %@:", host.name);
[self->_callback updateAllHosts:self->_hostQueue];
} else {
Log(LOG_D, @"Not adding host to discovery: %@", host.name);
Log(LOG_D, @"Found existing host through MDNS: %@", host.name);
}
});
}