mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
fix(ShardClientUtil): send method's promise erroneously rejecting (#2604)
Patches the remaining ones that were missed in eef4a4ad17
This commit is contained in:
@@ -37,10 +37,9 @@ class ShardClientUtil {
|
||||
*/
|
||||
send(message) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const sent = process.send(message, err => {
|
||||
process.send(message, err => {
|
||||
if (err) reject(err); else resolve();
|
||||
});
|
||||
if (!sent) throw new Error('Failed to send message to master process.');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user