mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-05 16:44:22 +00:00
Fix instance deletion check to account for restarting status
This commit is contained in:
@@ -330,7 +330,8 @@ func (im *instanceManager) DeleteInstance(name string) error {
|
||||
lock.Lock()
|
||||
defer im.unlockAndCleanup(name)
|
||||
|
||||
if inst.IsRunning() {
|
||||
status := inst.GetStatus()
|
||||
if status == instance.Running || status == instance.Restarting {
|
||||
return fmt.Errorf("instance with name %s is still running, stop it before deleting", name)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user