Skip to content

Commit 410af51

Browse files
committed
fix(cluster): fix memory leaking in sendCommand method
1 parent 9cd89bf commit 410af51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cluster/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ Cluster.prototype.sendCommand = function (command, stream, node) {
406406
if (!node && !command.__is_reject_overwritten) {
407407
command.__is_reject_overwritten = true;
408408
var reject = command.reject;
409-
var partialTry = _.partial(tryConnection, true);
410409
command.reject = function (err) {
410+
var partialTry = _.partial(tryConnection, true);
411411
_this.handleError(err, ttl, {
412412
moved: function (slot, key) {
413413
debug('command %s is moved to %s', command.name, key);

0 commit comments

Comments
 (0)