mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Gracefully end the device also in the termination case (instead of abort).
This commit is contained in:
@@ -48,13 +48,16 @@ inline int runStateMachine(TMQDevice& device, FairMQProgOptions& config)
|
||||
{
|
||||
device.WaitForEndOfState(TMQDevice::RUN);
|
||||
|
||||
device.ChangeState(TMQDevice::RESET_TASK);
|
||||
device.WaitForEndOfState(TMQDevice::RESET_TASK);
|
||||
if (!device.CheckCurrentState(TMQDevice::EXITING))
|
||||
{
|
||||
device.ChangeState(TMQDevice::RESET_TASK);
|
||||
device.WaitForEndOfState(TMQDevice::RESET_TASK);
|
||||
|
||||
device.ChangeState(TMQDevice::RESET_DEVICE);
|
||||
device.WaitForEndOfState(TMQDevice::RESET_DEVICE);
|
||||
device.ChangeState(TMQDevice::RESET_DEVICE);
|
||||
device.WaitForEndOfState(TMQDevice::RESET_DEVICE);
|
||||
|
||||
device.ChangeState(TMQDevice::END);
|
||||
device.ChangeState(TMQDevice::END);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user