Skip to content

Commit

Permalink
fix: ignore empty hosts returned by CLUSTER SLOTS (#1025)
Browse files Browse the repository at this point in the history
  • Loading branch information
liukun authored and luin committed Dec 25, 2019
1 parent 04cad7f commit d79a8ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/cluster/index.ts
Expand Up @@ -776,6 +776,9 @@ class Cluster extends EventEmitter {

const keys = [];
for (let j = 2; j < items.length; j++) {
if (!items[j][0]) {
continue;
}
items[j] = this.natMapper({ host: items[j][0], port: items[j][1] });
items[j].readOnly = j !== 2;
nodes.push(items[j]);
Expand Down

0 comments on commit d79a8ef

Please sign in to comment.