mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-05 16:44:22 +00:00
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() {
|
func (i *Instance) monitorProcess() {
|
||||||
defer func() {
|
defer func() {
|
||||||
|
i.mu.Lock()
|
||||||
if i.monitorDone != nil {
|
if i.monitorDone != nil {
|
||||||
close(i.monitorDone)
|
close(i.monitorDone)
|
||||||
|
i.monitorDone = nil
|
||||||
}
|
}
|
||||||
|
i.mu.Unlock()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
err := i.cmd.Wait()
|
err := i.cmd.Wait()
|
||||||
|
|||||||
Reference in New Issue
Block a user