Prevent slplugin from using too much cpu time.
This commit is contained in:
@@ -433,7 +433,7 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
|
||||
}
|
||||
else if(message_name == "sleep_time")
|
||||
{
|
||||
mSleepTime = parsed.getValueReal("time");
|
||||
mSleepTime = llmax(parsed.getValueReal("time"), 1.0 / 100.0); // clamp to maximum of 100Hz
|
||||
}
|
||||
else if(message_name == "crash")
|
||||
{
|
||||
|
||||
@@ -993,6 +993,7 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message)
|
||||
}
|
||||
|
||||
// Send initial sleep time
|
||||
llassert_always(mSleepTime != 0.f);
|
||||
setSleepTime(mSleepTime, true);
|
||||
|
||||
setState(STATE_RUNNING);
|
||||
|
||||
Reference in New Issue
Block a user