From fbf81bc7ad0d1ad74026a489ff086c5dd9265b60 Mon Sep 17 00:00:00 2001 From: hzxuzhonghu Date: Tue, 14 Nov 2017 11:03:49 +0800 Subject: [PATCH] fix underlying bug: double close channel when stop --- pkg/controller/garbagecollector/graph_builder.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/controller/garbagecollector/graph_builder.go b/pkg/controller/garbagecollector/graph_builder.go index c19305312e9..b957677663a 100644 --- a/pkg/controller/garbagecollector/graph_builder.go +++ b/pkg/controller/garbagecollector/graph_builder.go @@ -342,6 +342,9 @@ func (gb *GraphBuilder) Run(stopCh <-chan struct{}) { close(monitor.stopCh) } } + + // reset monitors so that the graph builder can be safely re-run/synced. + gb.monitors = nil glog.Infof("stopped %d of %d monitors", stopped, len(monitors)) }