Make destroy return a promise

This commit is contained in:
Ch. König
2016-01-16 15:22:01 +01:00
parent 9c8e6eed24
commit 8571723ec1

View File

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