From 5f00884facd29010a101acf138e3914c4ea84de1 Mon Sep 17 00:00:00 2001 From: grog Date: Tue, 26 Sep 2023 11:41:59 -0700 Subject: [PATCH] fixes concurrecy issues --- src/main/java/org/myrobotlab/service/Runtime.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/myrobotlab/service/Runtime.java b/src/main/java/org/myrobotlab/service/Runtime.java index 7f4f9f656e..7d02b26d01 100644 --- a/src/main/java/org/myrobotlab/service/Runtime.java +++ b/src/main/java/org/myrobotlab/service/Runtime.java @@ -139,7 +139,7 @@ public class Runtime extends Service implements MessageListener, * all these requests. */ @Deprecated /* use the filesystem only no memory plan */ - transient final Plan masterPlan = new Plan("runtime"); + transient Plan masterPlan = new Plan("runtime"); /** * thread for non-blocking install of services @@ -4293,7 +4293,8 @@ public Plan getLocalPlan() { */ static public void clearPlan() { Runtime runtime = Runtime.getInstance(); - runtime.masterPlan.clear(); + // fixes concurrent modification + runtime.masterPlan = new Plan("runtime"); runtime.masterPlan.put("runtime", new RuntimeConfig()); // unset config path runtime.configName = null;