mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 00:30:49 +00:00
Don't wait unnecessarily.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14726 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
751a74e1a3
commit
27976f40a6
1 changed files with 2 additions and 19 deletions
|
@ -747,27 +747,10 @@ static NSString *pathForUser(NSString *user)
|
||||||
// Initialize _persDomains from the archived user defaults (persistent)
|
// Initialize _persDomains from the archived user defaults (persistent)
|
||||||
_persDomains = [[NSMutableDictionaryClass alloc] initWithCapacity: 10];
|
_persDomains = [[NSMutableDictionaryClass alloc] initWithCapacity: 10];
|
||||||
if ([self synchronize] == NO)
|
if ([self synchronize] == NO)
|
||||||
{
|
|
||||||
NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
|
|
||||||
BOOL done = NO;
|
|
||||||
int attempts;
|
|
||||||
|
|
||||||
// Retry for a couple of seconds in case we are locked out.
|
|
||||||
for (attempts = 0; done == NO && attempts < 10; attempts++)
|
|
||||||
{
|
|
||||||
[runLoop runMode: NSDefaultRunLoopMode
|
|
||||||
beforeDate: [NSDate dateWithTimeIntervalSinceNow: 0.2]];
|
|
||||||
if ([self synchronize] == YES)
|
|
||||||
{
|
|
||||||
done = YES;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (done == NO)
|
|
||||||
{
|
{
|
||||||
DESTROY(self);
|
DESTROY(self);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Check and if not existent add the Application and the Global domains
|
// Check and if not existent add the Application and the Global domains
|
||||||
if (![_persDomains objectForKey: processName])
|
if (![_persDomains objectForKey: processName])
|
||||||
|
|
Loading…
Reference in a new issue