Author: rfm
Date: Mon Apr 24 12:31:18 2017
New Revision: 40490

URL: http://svn.gna.org/viewcvs/gnustep?rev=40490&view=rev
Log:
fix error relaunching clients which are not configured for autolaunch

Modified:
    libs/ec/trunk/EcCommand.m

Modified: libs/ec/trunk/EcCommand.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcCommand.m?rev=40490&r1=40489&r2=40490&view=diff
==============================================================================
--- libs/ec/trunk/EcCommand.m   (original)
+++ libs/ec/trunk/EcCommand.m   Mon Apr 24 12:31:18 2017
@@ -2280,22 +2280,20 @@
       [obj setProcessIdentifier: [c processIdentifier]];
 
       /* This client has launched ... remove it from the set of launching
-       * clients.
+       * clients and the set of launchable clients.
        */
       [launching removeObjectForKey: n];
-
-      /*
-       * If this client is in the list of launchable clients, set
-       * it's last launch time to now so that if it dies it will
-       * be restarted.  This overrides any previous shutdown - we
-       * assume that if it has been started by some process
-       * external to the Command server then we really don't want
-       * it shut down.
+      [launches removeObjectForKey: n];
+
+      /* If this client is in the list of clients launched automatically
+       * add its launch timestamp so it will be restarted quickly if it
+       * gets shut down.
        */
-      if ([launches objectForKey: n] != nil)
-       {
-         [launches setObject: [NSDate date] forKey: n];
-       }
+      if ([[[launchInfo objectForKey: n] objectForKey: @"Auto"] boolValue])
+        {
+          [launches setObject: [NSDate date] forKey: n];
+        }
+
       m = [NSString stringWithFormat: 
        @"%@ registered new server with name '%@' on %@\n",
        [NSDate date], n, host];


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to