From c198e893c9b8904c2877599473472bcf0a3eb158 Mon Sep 17 00:00:00 2001 From: DD Date: Thu, 23 Jun 2022 22:13:33 +0300 Subject: [PATCH] fix(WebSocketShard): backport error handler preservation on connections (#8164) --- 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 326dd45b8a13..6e71aec3ac9e 100644 --- a/src/client/websocket/WebSocketShard.js +++ b/src/client/websocket/WebSocketShard.js @@ -858,7 +858,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; } /**