add lock around [ServiceCom key] and remove some debug code

This commit is contained in:
Grant Limberg 2017-03-22 10:22:15 -07:00
parent aa71292265
commit 03b48a4ad4

View File

@ -55,7 +55,12 @@
- (NSString*)key:(NSError* __autoreleasing *)err
{
static NSString *k = nil;
static NSUInteger resetCount = 10;
static NSUInteger resetCount = 0;
@synchronized (self) {
if (_isQuitting) {
return @"";
}
if (_resetKey && k != nil) {
k = nil;
@ -202,7 +207,7 @@
return @"";
}
}
return k;
}