FIX: fixed issue of deleting entity
This commit is contained in:
Submodule libs/KubeControl updated: 53d2b9f890...894b2a08d6
@@ -138,32 +138,41 @@ namespace Entities
|
|||||||
|
|
||||||
void Entity::stop()
|
void Entity::stop()
|
||||||
{
|
{
|
||||||
stopChild();
|
try {
|
||||||
|
|
||||||
PodController_->stopAllPods();
|
PodController_->stopAllPods();
|
||||||
|
LOG_S(INFO)<<"Pods stoppt";
|
||||||
MovemtServer_.reset();
|
stopChild();
|
||||||
|
LOG_S(INFO)<<"childs stoppt";
|
||||||
|
|
||||||
|
// MovemtServer_.reset();
|
||||||
|
LOG_S(INFO)<<"MovemtServer_ reseted";
|
||||||
|
|
||||||
stopMainLoop = true;
|
stopMainLoop = true;
|
||||||
|
|
||||||
BroadcastServer_.reset();
|
// BroadcastServer_.reset();
|
||||||
|
LOG_S(INFO)<<"BroadcastServer_ reseted";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (std::vector<std::thread>::iterator it = threads.begin(); it != threads.end();)
|
for (std::vector<std::thread>::iterator it = threads.begin(); it != threads.end();)
|
||||||
{
|
{
|
||||||
if (it->joinable())
|
if (it->joinable())
|
||||||
{
|
{
|
||||||
|
|
||||||
it->join();
|
it->join();
|
||||||
it = threads.erase(it);
|
it = threads.erase(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_S(ERROR)<< threads.size();
|
LOG_S(ERROR)<< "Remaining Threads: " << threads.size();
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(30000));
|
// std::this_thread::sleep_for(std::chrono::milliseconds(30000));
|
||||||
|
|
||||||
exit(0);
|
// exit(0);
|
||||||
|
} catch (const std::exception e) {
|
||||||
|
LOG_S(ERROR)<< e.what();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entity::startMovementWorker()
|
void Entity::startMovementWorker()
|
||||||
|
|||||||
Reference in New Issue
Block a user