mutex return (#280)

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
LightningTipBot 2022-01-09 22:44:06 +00:00 committed by GitHub
parent 5a25f07bfb
commit c1fb07fcda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,11 +53,9 @@ func LockWithContext(ctx context.Context, s string) {
uid := ctx.Value("uid").(string)
if len(uid) == 0 {
log.Error("[Mutex] LockWithContext: uid is empty!")
return
}
if len(s) == 0 {
log.Error("[Mutex] LockWithContext: s is empty!")
return
}
// sync mutex to sync checkSoftLock with the increment of nLocks
// same user can't lock the same object multiple times