Skip to content

Commit

Permalink
fix: checkpoint error when destroy container
Browse files Browse the repository at this point in the history
  • Loading branch information
gosoon committed Aug 28, 2022
1 parent 4a51b04 commit 54eba28
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ checkpointed.`,

if !(options.LeaveRunning || options.PreDump) {
// destroy container unless we tell CRIU to keep it
defer destroy(container)
defer func() {
if err := killContainer(container); err != nil {
logrus.Error(err)
}
}()
}
// these are the mandatory criu options for a container
if err := setPageServer(context, options); err != nil {
Expand Down

0 comments on commit 54eba28

Please sign in to comment.