You've already forked node-redis
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:
committed by
Ruben Bridgewater
parent
e7c66d19ea
commit
b3407ff8c7
7
index.js
7
index.js
@@ -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 */
|
||||
|
Reference in New Issue
Block a user