Skip to content

Commit

Permalink
Correct whether Lock initially times out and whether the initial valu…
Browse files Browse the repository at this point in the history
…e of expiration is true
  • Loading branch information
snower committed May 18, 2024
1 parent 3cf2c9c commit 168a228
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions client/slock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,8 @@ var testGlock sync.Mutex

func testString2Key(key string) [16]byte {
bkey := [16]byte{}
klen := 16
if len(key) < 16 {
klen = len(key)
}

for i := 0; i < klen; i++ {
bkey[i] = key[i]
}
textCommandConverter := protocol.NewTextCommandConverter()
textCommandConverter.ConvertArgId2LockId(key, &bkey)
return bkey
}

Expand Down
2 changes: 1 addition & 1 deletion server/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ type Lock struct {

func NewLock(manager *LockManager, protocol ServerProtocol, command *protocol.LockCommand) *Lock {
return &Lock{manager, command, protocol.GetProxy(), nil, 0, 0, 0,
0, 1, 1, 0, 0, 0xff, false, false, 0, false}
0, 1, 1, 0, 0, 0xff, true, true, 0, false}
}

func (self *Lock) GetDB() *LockDB {
Expand Down

0 comments on commit 168a228

Please sign in to comment.