We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f80072 commit 2590357Copy full SHA for 2590357
1 file changed
machine.go
@@ -608,10 +608,16 @@ func (m *Machine) startVMM(ctx context.Context) error {
608
return err
609
}
610
611
- // This goroutine is used to kill the process by context cancelletion,
+ // This goroutine is used to kill the process by context cancellation,
612
// but doesn't tell anyone about that.
613
go func() {
614
- <-ctx.Done()
+ select {
615
+ case <-ctx.Done():
616
+ break
617
+ case <-m.exitCh:
618
+ // VMM exited on its own; no need to stop it.
619
+ return
620
+ }
621
err := m.stopVMM()
622
if err != nil {
623
m.logger.WithError(err).Errorf("failed to stop vm %q", m.Cfg.VMID)
0 commit comments