Skip to content

Commit

Permalink
fix(cluster): suppress errors emitted from internal clients
Browse files Browse the repository at this point in the history
Close #896, #899
  • Loading branch information
luin committed Jul 19, 2019
1 parent c3cf365 commit 30eafae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/cluster/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,11 @@ class Cluster extends EventEmitter {
retryStrategy: null,
connectionName: "ioredisClusterRefresher"
});

// Ignore error events since we will handle
// exceptions for the CLUSTER SLOTS command.
duplicatedConnection.on("error", noop);

duplicatedConnection.cluster(
"slots",
timeout((err, result) => {
Expand Down

0 comments on commit 30eafae

Please sign in to comment.