Don't attempt to pair on entry to foreground if we've become unpaired
This commit is contained in:
parent
63297c8483
commit
132a1fc410
1 changed files with 10 additions and 1 deletions
|
|
@ -317,13 +317,22 @@ static NSMutableSet* hostList;
|
|||
if ([[serverInfoResp getStringTag:@"PairStatus"] isEqualToString:@"1"]) {
|
||||
Log(LOG_I, @"Already Paired");
|
||||
[self alreadyPaired];
|
||||
} else {
|
||||
}
|
||||
// Only pair when this was the result of explicit user action
|
||||
else if (view != nil) {
|
||||
Log(LOG_I, @"Trying to pair");
|
||||
// Polling the server while pairing causes the server to screw up
|
||||
[self->_discMan stopDiscoveryBlocking];
|
||||
PairManager* pMan = [[PairManager alloc] initWithManager:hMan andCert:self->_cert callback:self];
|
||||
[self->_opQueue addOperation:pMan];
|
||||
}
|
||||
else {
|
||||
// Not user action, so just return to host screen
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self hideLoadingFrame];
|
||||
[self showHostSelectionView];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue