Merge pull request #556 from evanfoster/shutdown-agent

sandbox: Disconnect from agent after VM shutdown
This commit is contained in:
Peng Tao
2020-08-26 13:47:36 +08:00
committed by GitHub

View File

@@ -1623,6 +1623,11 @@ func (s *Sandbox) Stop(force bool) error {
return err
}
// Stop communicating with the agent.
if err := s.agent.disconnect(); err != nil && !force {
return err
}
return nil
}