mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 10:11:03 +00:00
Fix long delay on startup, and hopefully fix problem on BSD.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26083 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3741279a5f
commit
32891a37f6
2 changed files with 13 additions and 9 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-02-17 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSDistributedNotificationCenter.m: Remove delay and change
|
||||
code to immediately release resources used while trying to conneect
|
||||
to server.
|
||||
|
||||
2008-02-17 19:21-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSDistributedNotificationCenter.m: Added a short wait to the
|
||||
|
|
|
@ -736,20 +736,15 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
|||
}
|
||||
[NSTask launchedTaskWithLaunchPath: cmd arguments: args];
|
||||
|
||||
/*
|
||||
* Sleep for 3 seconds to prevent excessive polling and to
|
||||
* give the GDNC process some time to start. On some systems
|
||||
* it is failing to start because the polling is eating up
|
||||
* all of the file descriptors.
|
||||
*/
|
||||
[NSThread sleepForTimeInterval: 3.0];
|
||||
|
||||
limit = [NSDate dateWithTimeIntervalSinceNow: 5.0];
|
||||
while (_remote == nil && [limit timeIntervalSinceNow] > 0)
|
||||
{
|
||||
CREATE_AUTORELEASE_POOL(pool);
|
||||
_remote = [NSConnection
|
||||
rootProxyForConnectionWithRegisteredName: service
|
||||
host: host usingNameServer: ns];
|
||||
RETAIN(_remote);
|
||||
DESTROY(pool);
|
||||
}
|
||||
if (_remote == nil)
|
||||
{
|
||||
|
@ -759,8 +754,11 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
|||
@"I attempted to start it at '%@'\n", cmd];
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
RETAIN(_remote);
|
||||
}
|
||||
|
||||
c = [_remote connectionForProxy];
|
||||
[_remote setProtocolForProxy: p];
|
||||
|
||||
|
|
Loading…
Reference in a new issue