Skip to content

Commit eef4a4a

Browse files
committed
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: nodejs/node#7657 (comment)
1 parent c699888 commit eef4a4a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/sharding/Shard.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ class Shard {
5757
*/
5858
send(message) {
5959
return new Promise((resolve, reject) => {
60-
const sent = this.process.send(message, err => {
60+
this.process.send(message, err => {
6161
if (err) reject(err); else resolve(this);
6262
});
63-
if (!sent) throw new Error('Failed to send message to shard\'s process.');
6463
});
6564
}
6665

0 commit comments

Comments
 (0)