mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-04 00:36:14 +00:00
fix plugin monitor eating a whole cpu core
i must have messed this up when i changed the plugin monitor behavior recently
This commit is contained in:
parent
fd7b11f436
commit
2ed92c4aa1
@ -60,10 +60,8 @@ void TPluginMonitor::operator()() {
|
|||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
ToRemove.push_back(Pair.first);
|
ToRemove.push_back(Pair.first);
|
||||||
}
|
}
|
||||||
for (size_t i = 0; i < 3 && !Application::IsShuttingDown(); ++i) {
|
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Application::SleepSafeSeconds(3);
|
||||||
for (const auto& File : ToRemove) {
|
for (const auto& File : ToRemove) {
|
||||||
mFileTimes.erase(File);
|
mFileTimes.erase(File);
|
||||||
beammp_warnf("File \"{}\" couldn't be accessed, so it was removed from plugin hot reload monitor (probably got deleted)", File);
|
beammp_warnf("File \"{}\" couldn't be accessed, so it was removed from plugin hot reload monitor (probably got deleted)", File);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user