You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
If password is supplied but redis server does not require it, continue without throwing an error
This commit is contained in:
4
index.js
4
index.js
@@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user