Fix lock timeout bug
This commit is contained in:
1 parent
ef8aeda02d
commit
3f72bdd84b
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -135,7 +135,7 @@ function redisLock(lockName, ttl, callback) {
|
||||
}
|
||||
}
|
||||
|
||||
redisClient.set(lockName, token, "NX", "PX", ttl, function(err, res) {
|
||||
redisClient.set(lockName, token, "NX", "EX", ttl, function(err, res) {
|
||||
if (err || res)
|
||||
return callback(err, unlockOrExtend);
|
||||
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ function refresh(callback) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
cache.lock("presets_hash_lock", 3000, function(err, unlockOrExtend) {
|
||||
cache.lock("presets_hash_lock", 3, function(err, unlockOrExtend) {
|
||||
if (err)
|
||||
return callback(err);
|
||||
|
||||
|
||||
Reference in new issue
Block a user