diff --git a/src/client/Client.js b/src/client/Client.js index 58e7f595f..22163e77a 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -235,16 +235,14 @@ class Client extends EventEmitter { */ destroy() { return new Promise((resolve, reject) => { - this.manager.destroy().then(() => { - for (const t of this._timeouts) clearTimeout(t); - for (const i of this._intervals) clearInterval(i); - this._timeouts = []; - this._intervals = []; - this.token = null; - this.email = null; - this.password = null; - resolve(); - }).catch(reject); + for (const t of this._timeouts) clearTimeout(t); + for (const i of this._intervals) clearInterval(i); + this._timeouts = []; + this._intervals = []; + this.token = null; + this.email = null; + this.password = null; + this.manager.destroy().then(resolve).catch(reject); }); } diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 884076fb1..1555d4e95 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -36,7 +36,7 @@ class RESTMethods { } logout() { - return this.rest.makeRequest('post', Constants.Endpoints.logout, true); + return this.rest.makeRequest('post', Constants.Endpoints.logout, true, {}); } getGateway() {