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:
Richard Frith-Macdonald 2002-10-11 17:27:10 +00:00
parent 331d43ddda
commit 639a522a6c

View file

@ -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