Merge pull request #11515 from murgatroid99/node_fix_write_control_flow

Fix missing return after callback in a function
pull/11556/head
Michael Lumish 8 years ago committed by GitHub
commit 45b89d2821
  1. 2
      src/node/src/client.js

@ -152,6 +152,7 @@ function _write(chunk, encoding, callback) {
/* Once a write fails, just call the callback immediately to let the caller
flush any pending writes. */
setImmediate(callback);
return;
}
try {
message = this.serialize(chunk);
@ -164,6 +165,7 @@ function _write(chunk, encoding, callback) {
this.call.cancelWithStatus(constants.status.INTERNAL,
'Serialization failure');
callback(e);
return;
}
if (_.isFinite(encoding)) {
/* Attach the encoding if it is a finite number. This is the closest we

Loading…
Cancel
Save