mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-10-26 14:00:00 +00:00
Fix infinite loop of retries when multiple hosts are not resolving
This commit is contained in:
1 parent
4f03dd8c08
commit
9a03dd184a
1 file changed
+7
-7
@@ -240,7 +240,7 @@ static NSString* NV_SERVICE_TYPE = @"_nvstream._tcp";
|
||||
[NSTimer scheduledTimerWithTimeInterval:2.0
|
||||
target:self
|
||||
selector:@selector(retryResolveTimerCallback:)
|
||||
userInfo:nil
|
||||
userInfo:sender
|
||||
repeats:NO];
|
||||
}
|
||||
|
||||
@@ -294,12 +294,12 @@ static NSString* NV_SERVICE_TYPE = @"_nvstream._tcp";
|
||||
return;
|
||||
}
|
||||
|
||||
Log(LOG_I, @"Retrying mDNS resolution");
|
||||
for (NSNetService* service in services) {
|
||||
if (service.hostName == nil) {
|
||||
[service setDelegate:self];
|
||||
[service resolveWithTimeout:5];
|
||||
}
|
||||
NSNetService* service = timer.userInfo;
|
||||
Log(LOG_I, @"Retrying mDNS resolution for %@", service);
|
||||
|
||||
if (service.hostName == nil) {
|
||||
[service setDelegate:self];
|
||||
[service resolveWithTimeout:5];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user