mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-04-24 01:06:53 +00:00
Now stop discovery when pairing
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
- (id) initWithHosts:(NSArray*)hosts andCallback:(id<DiscoveryCallback>) callback;
|
||||
- (void) startDiscovery;
|
||||
- (void) stopDiscovery;
|
||||
- (void) stopDiscoveryBlocking;
|
||||
- (BOOL) addHostToDiscovery:(Host*)host;
|
||||
- (void) removeHostFromDiscovery:(Host*)host;
|
||||
- (void) discoverHost:(NSString*)hostAddress withCallback:(void (^)(Host*))callback;
|
||||
|
||||
@@ -69,8 +69,14 @@
|
||||
[_mdnsMan stopSearching];
|
||||
[_opQueue cancelAllOperations];
|
||||
}
|
||||
|
||||
- (void) stopDiscoveryBlocking {
|
||||
NSLog(@"Stopping discovery and waiting for workers to stop");
|
||||
shouldDiscover = NO;
|
||||
[_mdnsMan stopSearching];
|
||||
[_opQueue cancelAllOperations];
|
||||
[_opQueue waitUntilAllOperationsAreFinished];
|
||||
NSLog(@"All discovery workers stopped");
|
||||
}
|
||||
|
||||
- (BOOL) addHostToDiscovery:(Host *)host {
|
||||
|
||||
Reference in New Issue
Block a user