summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-07-19 10:21:22 +0200
committerAndrej Mihajlov <and@mullvad.net>2018-07-19 10:21:22 +0200
commit43e764738c436be344dc56a46aa729aa0ed0841f (patch)
tree6e0dbe4113462bd84f501c9924febaf155d188e6
parentdbadef5ad1f38e93f20187053854f45cdf7ca4a8 (diff)
downloadmullvadvpn-43e764738c436be344dc56a46aa729aa0ed0841f.tar.xz
mullvadvpn-43e764738c436be344dc56a46aa729aa0ed0841f.zip
Remove the use of HTML5 reachability API
-rw-r--r--app/app.js24
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) {