diff --git a/pkg/cache/store/mongodb.go b/pkg/cache/store/mongodb.go index fc6167b..32d0ac6 100644 --- a/pkg/cache/store/mongodb.go +++ b/pkg/cache/store/mongodb.go @@ -311,6 +311,8 @@ func (db *mongodb) LoadArticleList(ctx context.Context, search SearchArticles) ( if err != nil { return nil, 0, err } + defer cur.Close(ctx) + var articles model.SortedArticles for cur.Next(ctx) { obj := model.Article{}