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
commit 5fbac0a380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}