mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-05 16:44:22 +00:00
Merge pull request #3 from lordmathis/fix/max-restart-panic
Fix monitorProcess to properly close and reset monitorDone channel
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user