Merge pull request #3 from lordmathis/fix/max-restart-panic

Fix monitorProcess to properly close and reset monitorDone channel
This commit is contained in:
2025-07-27 12:27:08 +02:00
committed by GitHub

View File

@@ -142,9 +142,12 @@ func (i *Instance) Stop() error {
func (i *Instance) monitorProcess() {
defer func() {
i.mu.Lock()
if i.monitorDone != nil {
close(i.monitorDone)
i.monitorDone = nil
}
i.mu.Unlock()
}()
err := i.cmd.Wait()