Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
api: To stop its monitor after a sandbox paused
Browse files Browse the repository at this point in the history
After the sandbox is paused, it's needed to stop its monitor,
Otherwise, its monitors will receive timeout errors if it is
paused for a long time, thus its monitor will not tell it's a
crash caused timeout or just a paused timeout.

Fixes: #472

Signed-off-by: fupan <[email protected]>
  • Loading branch information
lifupan authored and Eric Ernst committed Aug 23, 2018
1 parent d10b1d8 commit 9868cf2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions virtcontainers/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,14 @@ func (s *Sandbox) Pause() error {
return err
}

//After the sandbox is paused, it's needed to stop its monitor,
//Otherwise, its monitors will receive timeout errors if it is
//paused for a long time, thus its monitor will not tell it's a
//crash caused timeout or just a paused timeout.
if s.monitor != nil {
s.monitor.stop()
}

return s.pauseSetStates()
}

Expand Down

0 comments on commit 9868cf2

Please sign in to comment.