From 5aa9425040e3057f878f74d892ed9e354543d88f Mon Sep 17 00:00:00 2001 From: DeJay Date: Thu, 30 May 2019 13:57:34 -0500 Subject: [PATCH] Removes the trace packet (#3312) * Removes the trace packet * Update src/client/websocket/WebSocketShard.js Co-Authored-By: Amish Shah * Update src/client/websocket/WebSocketShard.js Co-Authored-By: Amish Shah --- src/client/websocket/WebSocketShard.js | 13 ++----------- typings/index.d.ts | 1 - 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/client/websocket/WebSocketShard.js b/src/client/websocket/WebSocketShard.js index 3266c5782..13ffa9f6d 100644 --- a/src/client/websocket/WebSocketShard.js +++ b/src/client/websocket/WebSocketShard.js @@ -84,13 +84,6 @@ class WebSocketShard extends EventEmitter { */ this.lastHeartbeatAcked = true; - /** - * List of servers the shard is connected to - * @type {string[]} - * @private - */ - this.trace = []; - /** * Contains the rate limit queue and metadata * @type {Object} @@ -368,9 +361,8 @@ class WebSocketShard extends EventEmitter { this.emit(ShardEvents.READY); this.sessionID = packet.d.session_id; - this.trace = packet.d._trace; this.status = Status.READY; - this.debug(`READY ${this.trace.join(' -> ')} | Session ${this.sessionID}.`); + this.debug(`READY | Session ${this.sessionID}.`); this.lastHeartbeatAcked = true; this.sendHeartbeat(); break; @@ -381,10 +373,9 @@ class WebSocketShard extends EventEmitter { */ this.emit(ShardEvents.RESUMED); - this.trace = packet.d._trace; this.status = Status.READY; const replayed = packet.s - this.closeSequence; - this.debug(`RESUMED ${this.trace.join(' -> ')} | Session ${this.sessionID} | Replayed ${replayed} events.`); + this.debug(`RESUMED | Session ${this.sessionID} | Replayed ${replayed} events.`); this.lastHeartbeatAcked = true; this.sendHeartbeat(); } diff --git a/typings/index.d.ts b/typings/index.d.ts index 9fb53f40d..5e077f2b6 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1356,7 +1356,6 @@ declare module 'discord.js' { private sessionID?: string; private lastPingTimestamp: number; private lastHeartbeatAcked: boolean; - private trace: string[]; private ratelimit: { queue: object[]; total: number; remaining: number; time: 60e3; timer: NodeJS.Timeout | null; }; private connection: WebSocket | null; private helloTimeout: NodeJS.Timeout | null;