Skip to content

Commit 6af4436

Browse files
committed
A little optimization in a function if the client is closing.
1 parent a2ebe4f commit 6af4436

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ RedisClient.prototype.flush_and_error = function (message) {
178178
};
179179

180180
RedisClient.prototype.on_error = function (msg) {
181-
var message = "Redis connection to " + this.address + " failed - " + msg;
182-
183181
if (this.closing) {
184182
return;
185183
}
186184

185+
var message = "Redis connection to " + this.address + " failed - " + msg;
186+
187187
if (exports.debug_mode) {
188188
console.warn(message);
189189
}

0 commit comments

Comments
 (0)