errorception / redis-lock

Implements a locking primitive using redis. An implementation of the algorithm described at https://redis.io/commands/setnx
211 stars 48 forks source link

cast result to a number #13

Closed ashaffer closed 9 years ago

ashaffer commented 9 years ago

In version 0.10.1 of the redis client, this library is currently completely broken. It is doing a === check on result, but result is a string '0', which causes it to always think the lock is free.

rakeshpai commented 9 years ago

Thanks for this, @ashaffer. Published as 0.0.9.