Change write callback to asynchronous to avoid recursion

pull/11141/head
murgatroid99 8 years ago
parent 8d18c6edfb
commit d822e2f5cf
  1. 2
      src/node/src/client.js

@ -104,7 +104,7 @@ function _write(chunk, encoding, callback) {
if (this.writeFailed) {
/* Once a write fails, just call the callback immediately to let the caller
flush any pending writes. */
callback();
setImmediate(callback);
}
try {
message = this.serialize(chunk);

Loading…
Cancel
Save