From 410af511b7796ee3f2c656c28a8a1842c6b0f23d Mon Sep 17 00:00:00 2001 From: luin Date: Sun, 28 Feb 2016 00:13:10 +0800 Subject: [PATCH] fix(cluster): fix memory leaking in sendCommand method --- lib/cluster/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cluster/index.js b/lib/cluster/index.js index 451dbb3d..7181a7f0 100644 --- a/lib/cluster/index.js +++ b/lib/cluster/index.js @@ -406,8 +406,8 @@ Cluster.prototype.sendCommand = function (command, stream, 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) { + var partialTry = _.partial(tryConnection, true); _this.handleError(err, ttl, { moved: function (slot, key) { debug('command %s is moved to %s', command.name, key);