Update LunaHost.cpp

This commit is contained in:
恍兮惚兮 2024-04-25 13:00:01 +08:00
parent 89ef423bd8
commit 4b6cf1cdce

View File

@ -39,10 +39,11 @@ void LunaHost::on_close(){
hasstoped=true;
savesettings();
delete configs;
for(auto pid:attachedprocess){
auto _attachedprocess=attachedprocess;
for(auto pid:_attachedprocess){
Host::DetachProcess(pid);
}
if(attachedprocess.size())
if(_attachedprocess.size())
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}