From 05f0dfd4f53aef1f38df69c8c3fcef4647a61578 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 9 Jul 2015 21:02:19 -0700 Subject: [PATCH] Replace dispatch_sync with dispatch_async in pairing --- Limelight/ViewControllers/MainFrameViewController.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index 24b67bc..f014a1e 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -40,7 +40,7 @@ static NSMutableSet* hostList; static NSArray* appList; - (void)showPIN:(NSString *)PIN { - dispatch_sync(dispatch_get_main_queue(), ^{ + dispatch_async(dispatch_get_main_queue(), ^{ _pairAlert = [UIAlertController alertControllerWithTitle:@"Pairing" message:[NSString stringWithFormat:@"Enter the following PIN on the host machine: %@", PIN] preferredStyle:UIAlertControllerStyleAlert]; @@ -50,7 +50,7 @@ static NSArray* appList; } - (void)pairFailed:(NSString *)message { - dispatch_sync(dispatch_get_main_queue(), ^{ + dispatch_async(dispatch_get_main_queue(), ^{ [_pairAlert dismissViewControllerAnimated:YES completion:nil]; _pairAlert = [UIAlertController alertControllerWithTitle:@"Pairing Failed" message:message @@ -64,7 +64,7 @@ static NSArray* appList; } - (void)pairSuccessful { - dispatch_sync(dispatch_get_main_queue(), ^{ + dispatch_async(dispatch_get_main_queue(), ^{ [_pairAlert dismissViewControllerAnimated:YES completion:nil]; [_discMan startDiscovery]; [self alreadyPaired];