Node: propagate read errors back down to core

pull/5637/head
murgatroid99 9 years ago
parent e713659032
commit 0e65fb36f2
  1. 3
      src/node/src/client.js

@ -149,6 +149,9 @@ function _readsDone(status) {
if (!status) { if (!status) {
status = {code: grpc.status.OK, details: 'OK'}; status = {code: grpc.status.OK, details: 'OK'};
} }
if (status.code !== grpc.status.OK) {
this.call.cancelWithStatus(status.code, status.details);
}
this.finished = true; this.finished = true;
this.read_status = status; this.read_status = status;
this._emitStatusIfDone(); this._emitStatusIfDone();

Loading…
Cancel
Save