From ba1afdf8796d673ac31cfb0875dc83ca18cfb102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 15 Apr 2015 11:51:38 -0400 Subject: [PATCH] dont crash if callback isnt supplied fixes #3033 --- src/database/redis/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/database/redis/main.js b/src/database/redis/main.js index 59ae28827f..84e31eaae4 100644 --- a/src/database/redis/main.js +++ b/src/database/redis/main.js @@ -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); });