We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 415d847 + 602b455 commit a00a377Copy full SHA for a00a377
machine.go
@@ -613,10 +613,16 @@ func (m *Machine) startVMM(ctx context.Context) error {
613
return err
614
}
615
616
- // This goroutine is used to kill the process by context cancelletion,
+ // This goroutine is used to kill the process by context cancellation,
617
// but doesn't tell anyone about that.
618
go func() {
619
- <-ctx.Done()
+ select {
620
+ case <-ctx.Done():
621
+ break
622
+ case <-m.exitCh:
623
+ // VMM exited on its own; no need to stop it.
624
+ return
625
+ }
626
err := m.stopVMM()
627
if err != nil {
628
m.logger.WithError(err).Errorf("failed to stop vm %q", m.Cfg.VMID)
0 commit comments