diff --git a/collect.go b/collect.go index 6db8c97..0f1c1bb 100644 --- a/collect.go +++ b/collect.go @@ -43,7 +43,7 @@ func collectCopyCountLiveAnchors(cxt *WorkerContext) { continue } - for cur.Next(context.TODO()) { + for cur.Next(context.TODO()) && !ps.IsClose() { // la := &database.LiveAnchorsCountPoint{} la := &database.LiveAnchorsCountPointObjectID{} err = cur.Decode(la)