mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-23 06:32:28 +08:00
fix: mongodb current close
This commit is contained in:
2
pkg/cache/store/mongodb.go
vendored
2
pkg/cache/store/mongodb.go
vendored
@@ -311,6 +311,8 @@ func (db *mongodb) LoadArticleList(ctx context.Context, search SearchArticles) (
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
}
|
}
|
||||||
|
defer cur.Close(ctx)
|
||||||
|
|
||||||
var articles model.SortedArticles
|
var articles model.SortedArticles
|
||||||
for cur.Next(ctx) {
|
for cur.Next(ctx) {
|
||||||
obj := model.Article{}
|
obj := model.Article{}
|
||||||
|
|||||||
Reference in New Issue
Block a user