Merge pull request #715 from gzliudan/fix-sa5007

XDCxDAO: fix staticcheck warning SA5007: infinite recursive call
This commit is contained in:
Daniel Liu 2024-10-30 21:16:31 +08:00 committed by GitHub
commit dd7b9b1dea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -825,7 +825,10 @@ func (db *MongoDatabase) EnsureIndexes() error {
}
func (db *MongoDatabase) Close() error {
return db.Close()
if db.Session != nil {
db.Session.Close()
}
return nil
}
// HasAncient returns an error as we don't have a backing chain freezer.