mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Minor cleanup ofcode to break stale locks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26091 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d2e4204379
commit
fbe3e651ac
1 changed files with 3 additions and 2 deletions
|
@ -150,7 +150,7 @@ static void clean_up_names(void)
|
|||
{
|
||||
NSDate *limit = [NSDate dateWithTimeIntervalSinceNow: 2.0];
|
||||
|
||||
while ([dl tryLock] == NO)
|
||||
while (dl != nil && [dl tryLock] == NO)
|
||||
{
|
||||
if ([limit timeIntervalSinceNow] > 0.0)
|
||||
{
|
||||
|
@ -168,13 +168,14 @@ static void clean_up_names(void)
|
|||
{
|
||||
NSLog(@"Failed to break lock on names for "
|
||||
@"NSMessagePortNameServer: %@", localException);
|
||||
dl = nil;
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Failed to lock names for NSMessagePortNameServer");
|
||||
return nil;
|
||||
dl = nil;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue