diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-07-19 14:27:35 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-07-19 14:27:35 +0200 |
| commit | 25186fc12514e6ec061252bdef2964bb3d21b36d (patch) | |
| tree | 6e0dbe4113462bd84f501c9924febaf155d188e6 /app | |
| parent | dbadef5ad1f38e93f20187053854f45cdf7ca4a8 (diff) | |
| parent | 43e764738c436be344dc56a46aa729aa0ed0841f (diff) | |
| download | mullvadvpn-25186fc12514e6ec061252bdef2964bb3d21b36d.tar.xz mullvadvpn-25186fc12514e6ec061252bdef2964bb3d21b36d.zip | |
Merge branch 'remove-html5-reachability'
Diffstat (limited to 'app')
| -rw-r--r-- | app/app.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/app/app.js b/app/app.js index f22b66029b..c10df05deb 100644 --- a/app/app.js +++ b/app/app.js @@ -70,8 +70,6 @@ export default class AppRenderer { this._onCloseConnection(error); }); - this._setupReachability(); - setShutdownHandler(async () => { log.info('Executing a shutdown handler'); try { @@ -459,28 +457,6 @@ export default class AppRenderer { }); } - /** - * Start reachability monitoring for online/offline detection - * This is currently done via HTML5 APIs but will be replaced later - * with proper mullvad-daemon integration. - */ - _setupReachability() { - const actions = this._reduxActions; - - window.addEventListener('online', () => { - actions.connection.online(); - }); - window.addEventListener('offline', () => { - actions.connection.offline(); - }); - - if (navigator.onLine) { - actions.connection.online(); - } else { - actions.connection.offline(); - } - } - async _subscribeStateListener() { await this._daemonRpc.subscribeStateListener((newState, error) => { if (error) { |
