From b8c7642beb0e7db5c3660cef389f2f287b3a4943 Mon Sep 17 00:00:00 2001 From: Michael Wan Date: Sun, 22 Apr 2018 02:19:13 -0400 Subject: [PATCH] bugfix: update SafeMap item just call Put, no need call Remove Signed-off-by: Michael Wan --- daemon/mgr/container.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/daemon/mgr/container.go b/daemon/mgr/container.go index 4f28ebf3a..5dba1c28a 100644 --- a/daemon/mgr/container.go +++ b/daemon/mgr/container.go @@ -1087,9 +1087,6 @@ func (mgr *ContainerManager) Upgrade(ctx context.Context, name string, config *t } // Upgrade succeeded, refresh the cache - // remove old container from cache - mgr.cache.Remove(c.ID()) - // add new container to cache mgr.cache.Put(c.ID(), c) } @@ -1229,9 +1226,6 @@ func (mgr *ContainerManager) DisconnectContainerFromNetwork(ctx context.Context, } // container meta changed, refresh the cache - // remove old container from cache - mgr.cache.Remove(c.ID()) - // add new container to cache mgr.cache.Put(c.ID(), c) // update container meta json