ADD: ubdated stopping of the app

This commit is contained in:
Henry Winkel
2023-12-21 17:19:26 +01:00
parent 48a75f21e9
commit 49fe304069
2 changed files with 8 additions and 4 deletions

View File

@@ -77,7 +77,6 @@ namespace Entities
Entity::~Entity() Entity::~Entity()
{ {
stop(); stop();
} }
@@ -138,8 +137,12 @@ namespace Entities
void Entity::stop() void Entity::stop()
{ {
LOG_S(INFO)<<"Child pods:" << PodController_->getListOfChildPods();
PodController_->stopAllPods(); PodController_->stopAllPods();
LOG_S(INFO)<<"Child pods after stopping:" << PodController_->getListOfChildPods();
std::this_thread::sleep_for(std::chrono::milliseconds(5000));
LOG_S(INFO)<<"Pods stoppt"; LOG_S(INFO)<<"Pods stoppt";
stopChild(); stopChild();
LOG_S(INFO)<<"childs stoppt"; LOG_S(INFO)<<"childs stoppt";
@@ -304,6 +307,7 @@ namespace Entities
case SimCore::SHUT_DOWN : case SimCore::SHUT_DOWN :
{ {
LOG_S(INFO)<<"shutdown received"; LOG_S(INFO)<<"shutdown received";
this->stop(); this->stop();
} }
case SimCore::CREATE_ENTITY: case SimCore::CREATE_ENTITY: