diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-01-15 10:56:22 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-01-15 16:21:32 +0100 |
| commit | eea68a4c9bb4f2a87f26c60f976d697a0b73aaa0 (patch) | |
| tree | e1a80564f98a897544def77cf508d9d7069b6371 /app | |
| parent | 5d18e89eb714058dab2eaa0c92ae721c03b0abfb (diff) | |
| download | mullvadvpn-eea68a4c9bb4f2a87f26c60f976d697a0b73aaa0.tar.xz mullvadvpn-eea68a4c9bb4f2a87f26c60f976d697a0b73aaa0.zip | |
Add timeout for get_current_location
Diffstat (limited to 'app')
| -rw-r--r-- | app/lib/ipc-facade.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/lib/ipc-facade.js b/app/lib/ipc-facade.js index 145971e289..244e6bcc4b 100644 --- a/app/lib/ipc-facade.js +++ b/app/lib/ipc-facade.js @@ -268,7 +268,10 @@ export class RealIpc implements IpcFacade { } getLocation(): Promise<Location> { - return this._ipc.send('get_current_location') + // send the IPC with 30s timeout since the backend will wait + // for a HTTP request before replying + + return this._ipc.send('get_current_location', [], 30000) .then(raw => { try { const validated: any = validate(LocationSchema, raw); |
