mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
websocket should silently error if there are no listeners for error
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -192,7 +192,9 @@ class WebSocketManager {
|
||||
* @event Client#error
|
||||
* @param {Error} error The encountered error
|
||||
*/
|
||||
this.client.emit('error', err);
|
||||
if (this.client.listenerCount('error') > 0) {
|
||||
this.client.emit('error', err);
|
||||
}
|
||||
this.tryReconnect();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user