mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-21 02:41:11 +00:00
don't kill connection when we have a succesful unregister ... the remote end
needs it to stay alive for the response.
This commit is contained in:
parent
40b2c6fa7d
commit
634b013efb
1 changed files with 7 additions and 11 deletions
18
EcCommand.m
18
EcCommand.m
|
@ -1118,6 +1118,13 @@ NSLog(@"Problem %@", localException);
|
|||
|
||||
- (void) clientLost: (EcClientI*)o
|
||||
{
|
||||
NSConnection *c = [[o obj] connectionForProxy];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
removeObserver: self
|
||||
name: NSConnectionDidDieNotification
|
||||
object: c];
|
||||
[[c sendPort] invalidate];
|
||||
[self unregisterClient: o gracefully: NO];
|
||||
}
|
||||
|
||||
|
@ -3939,22 +3946,11 @@ NSLog(@"Problem %@", localException);
|
|||
|
||||
- (void) unregisterClient: (EcClientI*)o gracefully: (BOOL)clean
|
||||
{
|
||||
NSConnection *c = [[o obj] connectionForProxy];
|
||||
LaunchInfo *l = [LaunchInfo existing: [o name]];
|
||||
BOOL transient = [o transient];
|
||||
NSString *name = [l name];
|
||||
NSUInteger i;
|
||||
|
||||
/* We don't want a connection loss notification after the client has
|
||||
* unregistered, so we need to remove ourselves as an observer and
|
||||
* invalidate the connection to the client.
|
||||
*/
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
removeObserver: self
|
||||
name: NSConnectionDidDieNotification
|
||||
object: c];
|
||||
[[c sendPort] invalidate];
|
||||
|
||||
[l setAlive: NO];
|
||||
[o setUnregistered: YES];
|
||||
i = [clients indexOfObjectIdenticalTo: o];
|
||||
|
|
Loading…
Reference in a new issue