From 6af443639e1f8be3c21ce4ca5f1e32d34de80d7c Mon Sep 17 00:00:00 2001 From: David Vas Date: Thu, 11 Jun 2015 16:19:47 +0200 Subject: [PATCH] A little optimization in a function if the client is closing. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 7ec74775c0..44322e692b 100644 --- a/index.js +++ b/index.js @@ -178,12 +178,12 @@ RedisClient.prototype.flush_and_error = function (message) { }; RedisClient.prototype.on_error = function (msg) { - var message = "Redis connection to " + this.address + " failed - " + msg; - if (this.closing) { return; } + var message = "Redis connection to " + this.address + " failed - " + msg; + if (exports.debug_mode) { console.warn(message); }