Call the callback in destroy, its callback was previously unused

This commit is contained in:
meew0
2015-12-31 20:20:17 +01:00
parent a0ffbdb208
commit 2c565ebfaf

View File

@@ -94,9 +94,8 @@ export default class Client extends EventEmitter {
// def destroy
destroy(callback = (/*err, {}*/) => { }) {
this.internal.logout()
.then(() => {
this.internal.disconnected(true);
});
.then(() => this.internal.disconnected(true))
.then(dataCallback(callback), errorCallback(callback));
}
// def sendMessage