From 303451c2364de38dd56af458f5cfdd932f6f0b26 Mon Sep 17 00:00:00 2001
From: Ruud Overeem <overeem@astron.nl>
Date: Wed, 12 Dec 2012 08:52:49 +0000
Subject: [PATCH] Task #1418: When pipeline finished succesfully it was
 reported 'aborted' in SAS.

---
 .../src/ObservationControl/ObservationControl.cc      | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc b/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc
index 2437fee36e3..56786456d41 100644
--- a/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc
+++ b/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc
@@ -759,9 +759,14 @@ void  ObservationControl::doHeartBeatTask()
 		time_t	now   = to_time_t(second_clock::universal_time());
 		time_t	stop  = to_time_t(itsStopTime);
 		if (!nrChilds || (now < stop && itsProcessType == "Observation" && !nrStations)) {
-			LOG_FATAL("Too less stations left, FORCING QUIT OF OBSERVATION");
-			if (itsState < CTState::RESUME) {
-				itsQuitReason = CT_RESULT_LOST_CONNECTION;
+			if (itsProcessType == "Observation") {
+				LOG_FATAL("Too less stations left, FORCING QUIT OF OBSERVATION");
+				if (itsState < CTState::RESUME) {
+					itsQuitReason = CT_RESULT_LOST_CONNECTION;
+				}
+			}
+			else {
+				LOG_INFO("Lost connection with last childcontroller, quiting...");
 			}
 			itsTimerPort->cancelTimer(itsStopTimer);
 			itsStopTimer = itsTimerPort->setTimer(0.0);
-- 
GitLab