bugfix: cannot stop detector if rxr crashed

This commit is contained in:
maliakal_d 2020-10-01 17:54:08 +02:00
parent e5c98150e4
commit f31260030b

View File

@ -411,10 +411,16 @@ void Module::stopAcquisition() {
// get status before stopping acquisition
runStatus s = ERROR, r = ERROR;
bool zmqstreaming = false;
if (shm()->useReceiverFlag && getReceiverStreaming()) {
zmqstreaming = true;
s = getRunStatus();
r = getReceiverStatus();
try {
if (shm()->useReceiverFlag && getReceiverStreaming()) {
zmqstreaming = true;
s = getRunStatus();
r = getReceiverStatus();
}
} catch (...) {
// if receiver crashed, stop detector in any case
sendToDetectorStop(F_STOP_ACQUISITION);
return;
}
sendToDetectorStop(F_STOP_ACQUISITION);
shm()->stoppedFlag = true;