1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Fix handling of missing info return value. Fixes #541

This commit is contained in:
Ruben Bridgewater
2015-09-30 02:09:01 +02:00
parent afcd760b18
commit 025c65c614
2 changed files with 10 additions and 0 deletions

View File

@@ -343,6 +343,14 @@ RedisClient.prototype.on_info_cmd = function (err, res) {
return;
}
/* istanbul ignore if: some servers might not respond with any info data. This is just a safety check that is difficult to test */
if (!res) {
debug('The info command returned without any data.');
this.server_info = {};
this.on_ready();
return;
}
var self = this;
var obj = {};
var lines = res.toString().split("\r\n");