mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Fix stacked heartbeats on reconnect and fix documentation
This commit is contained in:
@@ -192,6 +192,7 @@ class WebSocketManager extends EventEmitter {
|
||||
* Emitted whenever the client websocket is disconnected
|
||||
* @event Client#disconnect
|
||||
*/
|
||||
clearInterval(this.client.manager.heartbeatInterval);
|
||||
if (!this.reconnecting) this.client.emit(Constants.Events.DISCONNECT);
|
||||
if (event.code === 4004) return;
|
||||
if (event.code === 4010) return;
|
||||
|
||||
Reference in New Issue
Block a user