mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 12:35:53 +00:00
websocket should silently error if there are no listeners for error
This commit is contained in:
parent
e44853ee6d
commit
dd623891e2
2 changed files with 4 additions and 2 deletions
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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue