summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorErik Larkö <erik@mullvad.net>2017-08-28 09:44:10 +0200
committerErik Larkö <erik@mullvad.net>2017-08-29 10:52:04 +0200
commit08b5efa05a8a69ace12356eac90676b589679868 (patch)
treef7f89ec1f5af967e16c21a8940def6a72c58c34e
parenta19c8f5e480c06a33fd1519e0a032130c0758e30 (diff)
downloadmullvadvpn-08b5efa05a8a69ace12356eac90676b589679868.tar.xz
mullvadvpn-08b5efa05a8a69ace12356eac90676b589679868.zip
Use 30s timeout when getting account data since the BE won\'t reply until it has completed a HTTP request to master
-rw-r--r--app/lib/ipc-facade.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/lib/ipc-facade.js b/app/lib/ipc-facade.js
index 798b4d2805..3a0a4cc101 100644
--- a/app/lib/ipc-facade.js
+++ b/app/lib/ipc-facade.js
@@ -53,7 +53,10 @@ export class RealIpc implements IpcFacade {
}
getAccountData(accountNumber: AccountNumber): Promise<AccountData> {
- return this._ipc.send('get_account_data', accountNumber)
+ // send the IPC with 30s timeout since the backend will wait
+ // for a HTTP request before replying
+
+ return this._ipc.send('get_account_data', accountNumber, 30000)
.then(raw => {
if (typeof raw === 'object' && raw && raw.expiry) {
return raw;