Skip to content

Commit

Permalink
fixes concurrecy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick committed Sep 26, 2023
1 parent b38784c commit 5f00884
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/myrobotlab/service/Runtime.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public class Runtime extends Service<RuntimeConfig> 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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5f00884

Please sign in to comment.