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