summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorErik Larkö <erik@mullvad.net>2017-05-18 22:47:42 +0200
committerErik Larkö <erik@mullvad.net>2017-05-19 06:05:44 +0200
commitd01dc48adc6e8a1471d22255e4b62201bcc8b9fa (patch)
tree5599276d2e788eddba847850c0f44393ded6dfe6
parent25f870293bae983d164f04178cf57a852e2d0416 (diff)
downloadmullvadvpn-d01dc48adc6e8a1471d22255e4b62201bcc8b9fa.tar.xz
mullvadvpn-d01dc48adc6e8a1471d22255e4b62201bcc8b9fa.zip
Logout and disconnect
-rw-r--r--app/lib/backend.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/app/lib/backend.js b/app/lib/backend.js
index 0aa8ccf37e..0766c37b4c 100644
--- a/app/lib/backend.js
+++ b/app/lib/backend.js
@@ -308,7 +308,7 @@ export default class Backend extends EventEmitter {
*/
logout() {
// @TODO: What does it mean for a logout to be successful or failed?
- this._ipc.send('logout')
+ this._ipc.send('set_account', '')
.then(() => {
this._paidUntil = null;
@@ -316,7 +316,7 @@ export default class Backend extends EventEmitter {
this.emit(Backend.EventType.logout);
// disconnect user during logout
- this.disconnect();
+ return this.disconnect();
})
.catch(e => {
log.info('Failed to logout', e);
@@ -360,12 +360,6 @@ export default class Backend extends EventEmitter {
*/
disconnect() {
// @TODO: Failure modes
- this._ipc.send('cancelConnection')
- .catch(e => {
- log.info('Failed cancelling connection', e);
- });
-
- // @TODO: Failure modes
this._ipc.send('disconnect')
.then(() => {
// emit: disconnect