mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
add lock around [ServiceCom key] and remove some debug code
This commit is contained in:
parent
aa71292265
commit
03b48a4ad4
1 changed files with 134 additions and 129 deletions
|
@ -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…
Add table
Reference in a new issue