mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-21 10:51:04 +00:00
Make testing for live processes more robust
This commit is contained in:
parent
c872e2dabc
commit
3662db65da
2 changed files with 25 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2019-08-23 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* EcCommand.m:
|
||||
When checking to see if a process is alive/responding, set a short
|
||||
timeout for the DO request to get a proxy to the process so that
|
||||
we don't hang waiting for a response that never comes.
|
||||
|
||||
2019-08-11 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* EcProcess.h:
|
||||
|
|
20
EcCommand.m
20
EcCommand.m
|
@ -518,10 +518,26 @@ static NSMutableDictionary *launchInfo = nil;
|
|||
|
||||
NS_DURING
|
||||
{
|
||||
proxy = (id<CmdClient>)[NSConnection
|
||||
rootProxyForConnectionWithRegisteredName: name
|
||||
NSConnection *c;
|
||||
|
||||
c = [NSConnection
|
||||
connectionWithRegisteredName: name
|
||||
host: @""
|
||||
usingNameServer: [NSSocketPortNameServer sharedInstance]];
|
||||
NS_DURING
|
||||
{
|
||||
/* Do not hang waiting for the other end to respond.
|
||||
*/
|
||||
[c setRequestTimeout: 5.0];
|
||||
[c setReplyTimeout: 5.0];
|
||||
proxy = (id<CmdClient>)[c rootProxy];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
[c setRequestTimeout: 0.0];
|
||||
[c setReplyTimeout: 0.0];
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
if (nil != proxy)
|
||||
{
|
||||
[proxy ecReconnect];
|
||||
|
|
Loading…
Reference in a new issue