Stop the old watchdog during restore

As we switch to a new watchdog during restore, there is no need to
keep the old one running anymore.

Signed-off-by: Tianyu Zhou <albert.zty@antgroup.com>
This commit is contained in:
Tianyu Zhou
2024-05-09 10:08:52 +08:00
parent 2e4177ed2d
commit 0d58a452a0
+1
View File
@@ -242,6 +242,7 @@ func (r *restorer) restore(l *Loader) error {
dog := watchdog.New(l.k, dogOpts)
// Change the loader fields to reflect the changes made when restoring.
l.watchdog.Stop()
l.watchdog = dog
l.root.procArgs = kernel.CreateProcessArgs{}
l.restore = true