diff --git a/src/node/src/client.js b/src/node/src/client.js index 9acf51bd98b26bec5051d8f6480b13336bb29403..81299b337ca48e7861fb0fa95b712a19aae87732 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();