From c14db4c2e7d6d69880464a628bc6770b014a072a Mon Sep 17 00:00:00 2001 From: gao Date: Mon, 24 Apr 2023 11:18:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/rpc/msg/lock.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/rpc/msg/lock.go b/internal/rpc/msg/lock.go index cef59cb1a..db6dc5fb2 100644 --- a/internal/rpc/msg/lock.go +++ b/internal/rpc/msg/lock.go @@ -5,7 +5,7 @@ import ( "time" ) -const GlOBLLOCK = "GLOBAL_LOCK" +const GlobalLock = "GLOBAL_LOCK" type MessageLocker interface { LockMessageTypeKey(clientMsgID, typeKey string) (err error) @@ -33,7 +33,7 @@ func (l *LockerMessage) LockMessageTypeKey(clientMsgID, typeKey string) (err err } func (l *LockerMessage) LockGlobalMessage(clientMsgID string) (err error) { for i := 0; i < 3; i++ { - err = db.DB.LockMessageTypeKey(clientMsgID, GlOBLLOCK) + err = db.DB.LockMessageTypeKey(clientMsgID, GlobalLock) if err != nil { time.Sleep(time.Millisecond * 100) continue @@ -48,5 +48,5 @@ func (l *LockerMessage) UnLockMessageTypeKey(clientMsgID string, typeKey string) return db.DB.UnLockMessageTypeKey(clientMsgID, typeKey) } func (l *LockerMessage) UnLockGlobalMessage(clientMsgID string) error { - return db.DB.UnLockMessageTypeKey(clientMsgID, GlOBLLOCK) + return db.DB.UnLockMessageTypeKey(clientMsgID, GlobalLock) }