From d822e2f5cf8d32efd0008c967551e994046b2d73 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 16 May 2017 12:53:57 -0700 Subject: [PATCH] Change write callback to asynchronous to avoid recursion --- src/node/src/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/src/client.js b/src/node/src/client.js index aa818349daa..2073d3eea8d 100644 --- a/src/node/src/client.js +++ b/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);