fix Client.destroy (#853)

_timeouts and _intervals were changed to Set objects in
commit 6ede7a32fd a month ago.

Like #844, this fix was reverted in 7d04863b66 (#839)
without explanation and was never included in the followup rewrite in
commit 5e2ee2398e.
This commit is contained in:
isonmad
2016-10-27 17:38:34 -04:00
committed by Schuyler Cebulskie
parent e80f06a059
commit 4bd19c94ba

View File

@@ -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;