From 0e65fb36f24bceb05b51a9970068d6ba6b1f409d Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 7 Mar 2016 17:49:37 -0800 Subject: [PATCH] Node: propagate read errors back down to core --- src/node/src/client.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/node/src/client.js b/src/node/src/client.js index 9acf51bd98b..81299b337ca 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -149,6 +149,9 @@ function _readsDone(status) { if (!status) { status = {code: grpc.status.OK, details: 'OK'}; } + if (status.code !== grpc.status.OK) { + this.call.cancelWithStatus(status.code, status.details); + } this.finished = true; this.read_status = status; this._emitStatusIfDone();