Skip to content

Commit b3407ff

Browse files
ivanB1975Ruben Bridgewater
authored andcommitted
ignore if info command is not available on server
1 parent e7c66d1 commit b3407ff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,16 @@ RedisClient.prototype.on_ready = function () {
380380

381381
RedisClient.prototype.on_info_cmd = function (err, res) {
382382
if (err) {
383+
/* ignore if the command info is not existing */
384+
if (err.message === "ERR unknown command 'info'"){
385+
this.server_info = {};
386+
this.on_ready();
387+
return;
388+
} else {
383389
err.message = 'Ready check failed: ' + err.message;
384390
this.emit('error', err);
385391
return;
392+
}
386393
}
387394

388395
/* istanbul ignore if: some servers might not respond with any info data. This is just a safety check that is difficult to test */

0 commit comments

Comments
 (0)