Skip to content

Commit 9796209

Browse files
committed
Merge pull request #764 from Anubisss/master
A little optimization in a function if the client is closing.
2 parents 6b1e789 + 86f1cef commit 9796209

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
@@ -181,12 +181,12 @@ RedisClient.prototype.flush_and_error = function (message) {
181181
};
182182

183183
RedisClient.prototype.on_error = function (msg) {
184-
var message = "Redis connection to " + this.address + " failed - " + msg;
185-
186184
if (this.closing) {
187185
return;
188186
}
189187

188+
var message = "Redis connection to " + this.address + " failed - " + msg;
189+
190190
if (exports.debug_mode) {
191191
console.warn(message);
192192
}

0 commit comments

Comments
 (0)