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