mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-26 14:00:05 +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
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user