summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-08-08 14:33:02 +0200
committerAndrej Mihajlov <and@mullvad.net>2018-08-08 16:25:34 +0200
commit952689e4af0d465285377fc14cec5a8d69338e79 (patch)
tree65530c7c7278f386095f461ab6696f59d6c80b25
parent0942cf5e191a5edefe6790cf470f80edf9b0cee1 (diff)
downloadmullvadvpn-952689e4af0d465285377fc14cec5a8d69338e79.tar.xz
mullvadvpn-952689e4af0d465285377fc14cec5a8d69338e79.zip
Fix flow warnings
-rw-r--r--app/lib/reconnection-backoff.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/lib/reconnection-backoff.js b/app/lib/reconnection-backoff.js
index 1cd8203dac..d777e86e57 100644
--- a/app/lib/reconnection-backoff.js
+++ b/app/lib/reconnection-backoff.js
@@ -1,13 +1,11 @@
+// @flow
+
/*
* Used to calculate the time to wait before reconnecting to the daemon.
* It uses a linear backoff function that goes from 500ms to 3000ms.
*/
export default class ReconnectionBackoff {
- _attempt: number;
-
- constructor() {
- this._attempt = 0;
- }
+ _attempt = 0;
attempt(handler: () => void) {
setTimeout(handler, this._getIncreasedBackoff());