1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

ignore if info command is not available on server

This commit is contained in:
ivanB1975
2015-10-29 16:32:14 +01:00
committed by Ruben Bridgewater
parent e7c66d19ea
commit b3407ff8c7

View File

@@ -380,9 +380,16 @@ RedisClient.prototype.on_ready = function () {
RedisClient.prototype.on_info_cmd = function (err, res) {
if (err) {
/* ignore if the command info is not existing */
if (err.message === "ERR unknown command 'info'"){
this.server_info = {};
this.on_ready();
return;
} else {
err.message = 'Ready check failed: ' + err.message;
this.emit('error', err);
return;
}
}
/* istanbul ignore if: some servers might not respond with any info data. This is just a safety check that is difficult to test */