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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user