Skip to content

Commit

Permalink
Merge pull request #1310 from mrpalide/fix/halt-not-done
Browse files Browse the repository at this point in the history
fix `halt` command
  • Loading branch information
0pcom authored Aug 2, 2022
2 parents d9a6882 + 8c896fb commit de50023
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "{build}"

stack: node 16.8.0
stack: node 16.8.0, go 1.17.11

environment:
matrix:
Expand Down
1 change: 1 addition & 0 deletions pkg/visor/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,7 @@ func (v *Visor) Shutdown() error {
if v.restartCtx == nil {
return ErrMalformedRestartContext
}
defer os.Exit(0)
return v.Close()
}

Expand Down
5 changes: 5 additions & 0 deletions pkg/visor/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,11 @@ func initHypervisor(_ context.Context, v *Visor, log *logging.Logger) error {
cancel()
}()

v.pushCloseStack("hypervisor", func() error {
cancel()
return err
})

return nil
}

Expand Down

0 comments on commit de50023

Please sign in to comment.