DetectorWrapper: Ignore exceptions of Detector:stopDetector()

This commit is contained in:
2023-09-19 19:29:12 +02:00
parent 3b8bbd4668
commit 2e63e50858

View File

@@ -134,7 +134,10 @@ void DetectorWrapper::InternalStop() {
throw JFJochException(JFJochExceptionCategory::Detector,
"Detector in error state");
else if (state == DetectorState::BUSY) {
det.stopDetector();
try {
// Sometimes stop gives problem - ignore these
det.stopDetector();
} catch (...) {}
std::this_thread::sleep_for(std::chrono::milliseconds(10));
state = GetState();
if (state != DetectorState::IDLE)