Skip to content
Snippets Groups Projects
Commit d822e2f5 authored by murgatroid99's avatar murgatroid99
Browse files

Change write callback to asynchronous to avoid recursion

parent 8d18c6ed
No related branches found
No related tags found
No related merge requests found
...@@ -104,7 +104,7 @@ function _write(chunk, encoding, callback) { ...@@ -104,7 +104,7 @@ function _write(chunk, encoding, callback) {
if (this.writeFailed) { if (this.writeFailed) {
/* Once a write fails, just call the callback immediately to let the caller /* Once a write fails, just call the callback immediately to let the caller
flush any pending writes. */ flush any pending writes. */
callback(); setImmediate(callback);
} }
try { try {
message = this.serialize(chunk); message = this.serialize(chunk);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment