fix SubcontainersInfo response not recursive bug

Signed-off-by: ChenQingya <qingya.chen520@gmail.com>
This commit is contained in:
ChenQingya 2020-05-20 17:19:24 +08:00
parent e8da0d53f0
commit 522e8bcaf5

View File

@ -159,7 +159,7 @@ func (cd *containerData) notifyOnDemand() {
func (cd *containerData) GetInfo(shouldUpdateSubcontainers bool) (*containerInfo, error) {
// Get spec and subcontainers.
if cd.clock.Since(cd.infoLastUpdatedTime) > 5*time.Second {
if cd.clock.Since(cd.infoLastUpdatedTime) > 5*time.Second || shouldUpdateSubcontainers {
err := cd.updateSpec()
if err != nil {
return nil, err