From 8b5eac8cf215022dd14978fbcb5e873db0e2fd29 Mon Sep 17 00:00:00 2001 From: Cinnamon <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 24 Jun 2022 09:16:13 +0700 Subject: [PATCH] fix(WebSocketShard): backport error handler preservation on connections https://github.com/discordjs/discord.js/pull/8164 v13.9.0 --- src/client/websocket/WebSocketShard.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/websocket/WebSocketShard.js b/src/client/websocket/WebSocketShard.js index 01cfc9e..63e4989 100644 --- a/src/client/websocket/WebSocketShard.js +++ b/src/client/websocket/WebSocketShard.js @@ -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; } /**