mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +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
331d43ddda
commit
639a522a6c
1 changed files with 2 additions and 19 deletions
|
@ -748,25 +748,8 @@ static NSString *pathForUser(NSString *user)
|
|||
_persDomains = [[NSMutableDictionaryClass alloc] initWithCapacity: 10];
|
||||
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);
|
||||
return self;
|
||||
}
|
||||
DESTROY(self);
|
||||
return self;
|
||||
}
|
||||
|
||||
// Check and if not existent add the Application and the Global domains
|
||||
|
|
Loading…
Reference in a new issue