Skip to content

Commit

Permalink
Merge #561
Browse files Browse the repository at this point in the history
561: Fix daemon hangs when suspending a suspended instance. r=townsend2010 a=smokfyz

Fix #559 and also hangs when suspending a stopped instance.

Co-authored-by: Ivan Sharapenkov <[email protected]>
  • Loading branch information
bors[bot] and smokfyz committed Jan 16, 2019
2 parents f3ed010 + a9529e4 commit 4bd6a58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/platform/backends/qemu/qemu_virtual_machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,10 @@ void mp::QemuVirtualMachine::suspend()
update_shutdown_status = false;
}
}
else if (state == State::off)
else if (state == State::off || state == State::suspended)
{
mpl::log(mpl::Level::info, vm_name, fmt::format("Ignoring suspend issued while stopped"));
mpl::log(mpl::Level::info, vm_name, fmt::format("Ignoring suspend issued while stopped/suspended"));
monitor->on_suspend();
}
}

Expand Down

0 comments on commit 4bd6a58

Please sign in to comment.