diff --git a/RELEASE.txt b/RELEASE.txt index 4ed282842..35f0df866 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -440,6 +440,11 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 Changes or Fixes: + * [Jungfrau][Gotthard2][Mythen3][Gotthard][Moench][Ctb] Can't stop + This bug was introduced in 6.1.1, when stopping an acquisition saying it + cannot stop, even though it was successful. It is fixed now. + + * Free and config command fail Free and config command checked mismatch of size of shared memory before freeing or loading new config. Fixed. diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index d6e28cdd4..343fa283f 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -826,7 +826,12 @@ void Detector::stopDetector(Positions pos) { int retries{0}; // avoid default construction of runStatus::IDLE on squash auto status = getDetectorStatus().squash(defs::runStatus::RUNNING); - while (status != defs::runStatus::IDLE) { + while (status != defs::runStatus::IDLE && + status != defs::runStatus::STOPPED) { + if (status == defs::runStatus::ERROR) { + throw RuntimeError( + "Could not stop detector. Returned error status."); + } pimpl->Parallel(&Module::stopAcquisition, pos); status = getDetectorStatus().squash(defs::runStatus::RUNNING); ++retries;