mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-22 14:22:23 +00:00
add lock around [ServiceCom key] and remove some debug code
This commit is contained in:
parent
aa71292265
commit
03b48a4ad4
@ -55,7 +55,12 @@
|
|||||||
- (NSString*)key:(NSError* __autoreleasing *)err
|
- (NSString*)key:(NSError* __autoreleasing *)err
|
||||||
{
|
{
|
||||||
static NSString *k = nil;
|
static NSString *k = nil;
|
||||||
static NSUInteger resetCount = 10;
|
static NSUInteger resetCount = 0;
|
||||||
|
|
||||||
|
@synchronized (self) {
|
||||||
|
if (_isQuitting) {
|
||||||
|
return @"";
|
||||||
|
}
|
||||||
|
|
||||||
if (_resetKey && k != nil) {
|
if (_resetKey && k != nil) {
|
||||||
k = nil;
|
k = nil;
|
||||||
@ -202,7 +207,7 @@
|
|||||||
|
|
||||||
return @"";
|
return @"";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user