aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2016-03-07 17:49:37 -0800
committerGravatar murgatroid99 <mlumish@google.com>2016-03-07 17:49:37 -0800
commit0e65fb36f24bceb05b51a9970068d6ba6b1f409d (patch)
tree7d305a51d045836993b81347c0b5ee98d7576b61 /src
parente713659032c36f59cb1b9499dc51e5295398d946 (diff)
Node: propagate read errors back down to core
Diffstat (limited to 'src')
-rw-r--r--src/node/src/client.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node/src/client.js b/src/node/src/client.js
index 9acf51bd98..81299b337c 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();