diff options
| author | Emīls Piņķis <emils@mullvad.net> | 2018-04-13 13:09:54 +0100 |
|---|---|---|
| committer | Emīls Piņķis <emils@mullvad.net> | 2018-04-17 16:00:59 +0100 |
| commit | 06618e704849a42cf3dc522d9d30efac5c07d869 (patch) | |
| tree | 5ee6bb5e2bf9e7d03ff05f02efd266968e7e1460 /app/app.js | |
| parent | 78ef1369e72a2a46f797231345801e6a7b2af898 (diff) | |
| download | mullvadvpn-06618e704849a42cf3dc522d9d30efac5c07d869.tar.xz mullvadvpn-06618e704849a42cf3dc522d9d30efac5c07d869.zip | |
Disconnect from tunnel when UI is closed on Linux
Diffstat (limited to 'app/app.js')
| -rw-r--r-- | app/app.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/app.js b/app/app.js index 6e9272e88b..13a5c75f59 100644 --- a/app/app.js +++ b/app/app.js @@ -47,6 +47,14 @@ ipcRenderer.on('shutdown', () => { log.warn('Unable to shut down the backend', e.message); }); }); + +ipcRenderer.on('disconnect', () => { + log.info('Been told by the node process to disconnect the tunnel'); + backend.disconnect() + .catch( e => { + log.warn('Unable to disconnect the tunnel', e.message); + }); +}); ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// |
