From 66a0d973a73f46cd0861ff953d343fa748d99e8d Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 22 May 2015 11:06:11 -0700 Subject: [PATCH] Reverted change to _write in client.js --- src/client.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client.js b/src/client.js index 9a50bf24..65339406 100644 --- a/src/client.js +++ b/src/client.js @@ -80,7 +80,11 @@ function _write(chunk, encoding, callback) { var batch = {}; batch[grpc.opType.SEND_MESSAGE] = this.serialize(chunk); this.call.startBatch(batch, function(err, event) { - callback(err); + if (err) { + // Something has gone wrong. Stop writing by failing to call callback + return; + } + callback(); }); }