mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 11:06:21 +00:00
api: To stop its monitor after a sandbox paused
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 <lifupan@gmail.com>
This commit is contained in:
parent
b2bec3362b
commit
114482ed99
@ -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()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user