1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

A little optimization in a function if the client is closing.

This commit is contained in:
David Vas
2015-06-11 16:19:47 +02:00
parent a2ebe4f248
commit 6af443639e

View File

@@ -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);
}