diff --git a/fairmq/plugins/Control.cxx b/fairmq/plugins/Control.cxx index c7262bd0..1cabc920 100644 --- a/fairmq/plugins/Control.cxx +++ b/fairmq/plugins/Control.cxx @@ -209,6 +209,11 @@ try } } + if (GetCurrentDeviceState() == DeviceState::Error) + { + throw DeviceErrorState("Controlled device transitioned to error state."); + } + if (fDeviceShutdownRequested) { break; @@ -273,6 +278,11 @@ try { fNewEvent.wait_for(lock, chrono::milliseconds(50)); } + + if (fEvents.front() == DeviceState::Error) + { + throw DeviceErrorState("Controlled device transitioned to error state."); + } } RunShutdownSequence();