Skip to content

Commit

Permalink
fix(cluster): avoid command.reject being overwritten twice
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Feb 9, 2016
1 parent b52c1bf commit d0a0017
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cluster/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,8 @@ Cluster.prototype.sendCommand = function (command, stream, node) {
var targetSlot = node ? node.slot : command.getSlot();
var ttl = {};
var _this = this;
if (!node) {
if (!node && !command.__is_reject_overwritten) {
command.__is_reject_overwritten = true;
var reject = command.reject;
var partialTry = _.partial(tryConnection, true);
command.reject = function (err) {
Expand Down

0 comments on commit d0a0017

Please sign in to comment.