Moved configuration web request to another thread (#85)

* Moved configuration web request to another thread

Fixes the FPS drop when spam clicking a config checkbox.
Changed logging back to the original

I was playing around with how i should write the Runnable, and accidently replaced the sl4j logging.
This commit is contained in:
RobinWeymans
2017-06-17 03:15:03 +02:00
committed by Adam
parent 3bdf02a272
commit 204f4a9685

View File

@@ -230,14 +230,19 @@ public class ConfigManager
if (client != null)
{
try
Runnable task = () ->
{
client.set(groupName + "." + key, value);
}
catch (IOException ex)
{
logger.warn("unable to set configuration item", ex);
}
try
{
client.set(groupName + "." + key, value);
}
catch (IOException ex)
{
logger.warn("unable to set configuration item", ex);
}
};
RuneLite.getRunelite().getExecutor().execute(task);
}
try