From 39186a4edfd4d0558ed96e86a84cd4c169e1d44b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 21 Oct 2014 05:11:51 -0400 Subject: [PATCH] Properly start and stop mDNS manager --- Limelight/ViewControllers/MainFrameViewController.m | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index df632d29..07db5a6c 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -157,9 +157,18 @@ static StreamConfiguration* streamConfig; self.hostPickerVals = [[NSArray alloc] init]; [self.StreamConfigs selectRow:1 inComponent:0 animated:NO]; + _opQueue = [[NSOperationQueue alloc] init]; +} + +- (void)viewDidAppear:(BOOL)animated +{ _mDNSManager = [[MDNSManager alloc] initWithCallback:self]; [_mDNSManager searchForHosts]; - _opQueue = [[NSOperationQueue alloc] init]; +} + +- (void)viewDidDisappear:(BOOL)animated +{ + [_mDNSManager stopSearching]; } - (void)updateHosts:(NSArray *)hosts {