dont crash if callback isnt supplied fixes #3033

v1.18.x
Barış Soner Uşaklı 10 years ago
parent 68835844b0
commit ba1afdf879

@ -105,24 +105,28 @@ module.exports = function(redisClient, module) {
};
module.expire = function(key, seconds, callback) {
callback = callback || function() {};
redisClient.expire(key, seconds, function(err) {
callback(err);
});
};
module.expireAt = function(key, timestamp, callback) {
callback = callback || function() {};
redisClient.expireat(key, timestamp, function(err) {
callback(err);
});
};
module.pexpire = function(key, ms, callback) {
callback = callback || function() {};
redisClient.pexpire(key, ms, function(err) {
callback(err);
});
};
module.pexpireAt = function(key, timestamp, callback) {
callback = callback || function() {};
redisClient.pexpireat(key, timestamp, function(err) {
callback(err);
});

Loading…
Cancel
Save