From 3c80be4eccb08b4cfe8b01fdfc3338d4413f9957 Mon Sep 17 00:00:00 2001 From: Richard Frith-Macdonald Date: Fri, 17 Jul 2020 16:59:50 +0100 Subject: [PATCH] check for the case where a starting process is stopped during the -startup: call --- EcCommand.m | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/EcCommand.m b/EcCommand.m index b67ea19..c58b990 100644 --- a/EcCommand.m +++ b/EcCommand.m @@ -1831,11 +1831,18 @@ desiredName(Desired state) [startingTimer invalidate]; EcExceptionMajor(nil, @"startingTimer reset %@", self); } - startingTimer = [NSTimer scheduledTimerWithTimeInterval: ti - target: self - selector: _cmd - userInfo: name - repeats: NO]; + if (startingDate > 0.0) + { + startingTimer = [NSTimer scheduledTimerWithTimeInterval: ti + target: self + selector: _cmd + userInfo: name + repeats: NO]; + } + else + { + NSLog(@"Startup cancelled in -starting: for %@", self); + } } - (NSDate*) startingDate