From d58cfb078c95ea0093aca0265f53e411c680c892 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 15 Jun 2017 17:32:32 -0700 Subject: [PATCH 1/2] Fix missing return after callback in a function --- src/node/src/client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node/src/client.js b/src/node/src/client.js index f59ac5c94c5..8892aa7c50e 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -152,6 +152,7 @@ function _write(chunk, encoding, callback) { /* Once a write fails, just call the callback immediately to let the caller flush any pending writes. */ setImmediate(callback); + return; } try { message = this.serialize(chunk); From 8e7a95d67c3611434e26eb916760e5ab3caea72a Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 19 Jun 2017 12:36:11 -0700 Subject: [PATCH 2/2] Add another missing return after a callback --- src/node/src/client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node/src/client.js b/src/node/src/client.js index 8892aa7c50e..0b44144920f 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -165,6 +165,7 @@ function _write(chunk, encoding, callback) { this.call.cancelWithStatus(constants.status.INTERNAL, 'Serialization failure'); callback(e); + return; } if (_.isFinite(encoding)) { /* Attach the encoding if it is a finite number. This is the closest we