Browse Source

fix: Stopping and starting the processor when loading the initial file.

Matthias Ladkau 3 years ago
parent
commit
981956ff93
1 changed files with 5 additions and 0 deletions
  1. 5 0
      cli/tool/interpret.go

+ 5 - 0
cli/tool/interpret.go

@@ -177,6 +177,9 @@ LoadInitialFile clears the global scope and reloads the initial file.
 func (i *CLIInterpreter) LoadInitialFile(tid uint64) error {
 	var err error
 
+	i.RuntimeProvider.Processor.Finish()
+	i.RuntimeProvider.Processor.Reset()
+
 	if i.CustomHandler != nil {
 		i.CustomHandler.LoadInitialFile(tid)
 	}
@@ -203,6 +206,8 @@ func (i *CLIInterpreter) LoadInitialFile(tid uint64) error {
 		}
 	}
 
+	i.RuntimeProvider.Processor.Start()
+
 	return err
 }