From c7973767d6b551f31b4d5814239d026e7d2f4515 Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Wed, 31 Jul 2024 09:16:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(db):=20post=E9=94=81=E6=9C=AA=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/database/mongo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/database/mongo.go b/backend/database/mongo.go index 6d13db1..e84f839 100644 --- a/backend/database/mongo.go +++ b/backend/database/mongo.go @@ -68,7 +68,7 @@ var PresetMetadata = []Metadata{ type MongoDBManager struct { Client *mongo.Client - PostLock sync.Mutex + PostLock *sync.Mutex } func NewMongoDBManager() *MongoDBManager { @@ -82,7 +82,7 @@ func NewMongoDBManager() *MongoDBManager { m := &MongoDBManager{ Client: client, - PostLock: sync.Mutex{}, + PostLock: &sync.Mutex{}, } // 检查连接