Skip to content

Commit

Permalink
If password is supplied but redis server does not require it, continu…
Browse files Browse the repository at this point in the history
…e without throwing an error
  • Loading branch information
Jonathan Bergknoff committed May 9, 2013
1 parent 515e975 commit 35001fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ RedisClient.prototype.do_auth = function () {
self.do_auth();
}, 2000); // TODO - magic number alert
return;
} else if (err.toString().match("no password is set")) {
console.log("Warning: Redis server does not require a password, but a password was supplied.")
err = null;
res = "OK";
} else {
return self.emit("error", new Error("Auth error: " + err.message));
}
Expand Down

0 comments on commit 35001fe

Please sign in to comment.