From 512af54e5df43bb85a617708501892ec6b5b0a42 Mon Sep 17 00:00:00 2001 From: Lewdcario Date: Mon, 4 Jun 2018 18:01:10 -0500 Subject: [PATCH] fix(Shard): erroneously returning false The node documentation fails to correctly document when the backlog of unsent messages exceeds a certain threshhold the function will return false. This does not mean it will refuse to send- simply that it will take time. Issue in point: https://github.com/nodejs/node/issues/7657#issuecomment-240581726 --- src/sharding/Shard.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index 3ba7dd1f0..55a76816f 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -140,10 +140,9 @@ class Shard extends EventEmitter { */ send(message) { return new Promise((resolve, reject) => { - const sent = this.process.send(message, err => { + this.process.send(message, err => { if (err) reject(err); else resolve(this); }); - if (!sent) throw new Error('SHARDING_CHILD_CONNECTION'); }); }