mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-02 21:01:07 +00:00
Build in mechanism to break stale locks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26089 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b8c37c9729
commit
7b2dc802c1
1 changed files with 18 additions and 2 deletions
|
@ -158,8 +158,24 @@ static void clean_up_names(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Failed to lock names for NSMessagePortNameServer");
|
||||
return nil;
|
||||
if ([[dl lockDate] timeIntervalSinceNow] < -15.0)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[dl breakLock];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSLog(@"Failed to break lock on names for "
|
||||
@"NSMessagePortNameServer: %@", localException);
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Failed to lock names for NSMessagePortNameServer");
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue