Permalink
Browse files

Merge pull request #3 from mogstad/setnx_allow_string

Make sure setnx's result is an integer
  • Loading branch information...
jcohen committed May 9, 2013
2 parents ed52894 + 49dfd95 commit fd3300221acf1d78fd82afe8bd936a35d19f9084
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
View
@@ -47,7 +47,7 @@ RedisLockingWorker.prototype.acquire = function acquire() {
return;
}
- if (result) {
+ if (~~result) {
that.emit("acquired", false);
} else {
that.emit("locked");

0 comments on commit fd33002

Please sign in to comment.