1
0
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:
Jonathan Bergknoff
2013-05-09 10:46:26 -07:00
parent 515e975539
commit 35001fec76

View File

@@ -182,6 +182,10 @@ RedisClient.prototype.do_auth = function () {
self.do_auth(); self.do_auth();
}, 2000); // TODO - magic number alert }, 2000); // TODO - magic number alert
return; 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 { } else {
return self.emit("error", new Error("Auth error: " + err.message)); return self.emit("error", new Error("Auth error: " + err.message));
} }