diff --git a/src/node/src/client.js b/src/node/src/client.js index 9cc5a62bdbcafe486222a0f081f37111078c81b0..2459e283214a2e58ee415870692e2c41891c9a5a 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();