Fix throw after quit signal case

This commit is contained in:
Alexey Rybalchenko
2018-10-10 11:43:34 +02:00
committed by Dennis Klein
parent e39316c866
commit cb199e7283
5 changed files with 55 additions and 53 deletions

View File

@@ -339,7 +339,7 @@ auto Control::RunShutdownSequence() -> void
{
auto nextState = GetCurrentDeviceState();
EmptyEventQueue();
while (nextState != DeviceState::Exiting)
while (nextState != DeviceState::Exiting && nextState != DeviceState::Error)
{
switch (nextState)
{
@@ -359,7 +359,7 @@ auto Control::RunShutdownSequence() -> void
ChangeDeviceState(DeviceStateTransition::Resume);
break;
default:
// ignore other states
LOG(debug) << "Controller ignoring event: " << nextState;
break;
}