Fix stop rx stuck (#669)

stop should really stop even if receiver had crashed, so check rx status after sending stop; also ensuring restream  in acquire happens only if thers a callback
This commit is contained in:
Dhanya Thattil
2023-02-20 15:21:22 +01:00
committed by GitHub
parent 878eab9fc3
commit fe281bd1b1
3 changed files with 20 additions and 15 deletions

View File

@ -1224,8 +1224,7 @@ int DetectorImpl::acquire() {
// let the progress thread (no callback) know acquisition is done
if (dataReady == nullptr) {
setJoinThreadFlag(true);
}
if (receiver) {
} else if (receiver) {
while (numZmqRunning != 0) {
Parallel(&Module::restreamStopFromReceiver, {});
std::this_thread::sleep_for(std::chrono::milliseconds(200));
@ -1315,6 +1314,7 @@ void DetectorImpl::processData(bool receiver) {
}
// only update progress
else {
LOG(logINFO) << "Type 'q' and hit enter to stop";
double progress = 0;
printProgress(progress);