fix(WebSocketShard): backport error handler preservation on connections

https://github.com/discordjs/discord.js/pull/8164
v13.9.0
This commit is contained in:
Cinnamon 2022-06-24 09:16:13 +07:00
parent 3877bdf176
commit 8b5eac8cf2

View File

@ -869,7 +869,8 @@ class WebSocketShard extends EventEmitter {
* @private
*/
_cleanupConnection() {
this.connection.onopen = this.connection.onclose = this.connection.onerror = this.connection.onmessage = null;
this.connection.onopen = this.connection.onclose = this.connection.onmessage = null;
this.connection.onerror = () => null;
}
/**