Closed
Description
Hi,
I was trying to get the contents of a lock without acquiring the lock, but found that when I tried to get the lock,
lock, err = client.Get(dynamoLockName)
I received a lock with no data.
I looked into Get
, and found that this branch was getting executed: https://github.com/cirello-io/dynamolock/blob/master/client.go#L906, because the lock is currently not held. Therefore, an empty lock is returned, with no data.
I'm happy to make a PR to fix this by removing the lockItem.isReleased
check, but wanted to confirm.