From 4bd19c94ba47cd53f9723a9349b9b29fc2646c01 Mon Sep 17 00:00:00 2001 From: isonmad Date: Thu, 27 Oct 2016 17:38:34 -0400 Subject: [PATCH] fix Client.destroy (#853) _timeouts and _intervals were changed to Set objects in commit 6ede7a32fd29bd44e65e344e1f102332d30c2129 a month ago. Like #844, this fix was reverted in 7d04863b66177c105a92b39ffc990be3b6bfe84f (#839) without explanation and was never included in the followup rewrite in commit 5e2ee2398ea5f7b30d8c1783be5cde05803e54fd. --- src/client/Client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index 98a9fa9f6..17eddf5fd 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -236,8 +236,8 @@ class Client extends EventEmitter { destroy() { for (const t of this._timeouts) clearTimeout(t); for (const i of this._intervals) clearInterval(i); - this._timeouts = []; - this._intervals = []; + this._timeouts.clear(); + this._intervals.clear(); this.token = null; this.email = null; this.password = null;