From 7e80f282a0983bd3a0c067cb0e486ab95fba31d3 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Tue, 3 Jan 2017 09:13:06 +0100 Subject: [PATCH] Don't send exception when already stopped container can't be stopped again --- src/anbox/container/lxc_container.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/anbox/container/lxc_container.cpp b/src/anbox/container/lxc_container.cpp index 3b5c39e..209c29b 100644 --- a/src/anbox/container/lxc_container.cpp +++ b/src/anbox/container/lxc_container.cpp @@ -201,8 +201,7 @@ void LxcContainer::start(const Configuration &configuration) { void LxcContainer::stop() { if (not container_ || not container_->is_running(container_)) - BOOST_THROW_EXCEPTION( - std::runtime_error("Cannot stop container as it is not running")); + return; if (not container_->stop(container_)) BOOST_THROW_EXCEPTION(std::runtime_error("Failed to stop container"));