Skip to content

Commit

Permalink
fix(db): post锁未使用指针
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ committed Jul 31, 2024
1 parent 3703c61 commit c797376
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/database/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var PresetMetadata = []Metadata{
type MongoDBManager struct {
Client *mongo.Client

PostLock sync.Mutex
PostLock *sync.Mutex
}

func NewMongoDBManager() *MongoDBManager {
Expand All @@ -82,7 +82,7 @@ func NewMongoDBManager() *MongoDBManager {

m := &MongoDBManager{
Client: client,
PostLock: sync.Mutex{},
PostLock: &sync.Mutex{},
}

// 检查连接
Expand Down

0 comments on commit c797376

Please sign in to comment.