浏览代码

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

Matthias Ladkau 4 年之前
父节点
当前提交
981956ff93
共有 1 个文件被更改,包括 5 次插入0 次删除
  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
 }