From ef3cf61122e697c5cc00afd6bd9518f33b5157b1 Mon Sep 17 00:00:00 2001 From: Vladimir Y Date: Tue, 31 Jul 2018 17:53:50 +0300 Subject: [PATCH] increase "changeAccountOrder" api call timeout * 10 seconds might not be enough on low-performance systems in case of "sensitive" key derivation function used --- src/web/src/app/+options/options.effects.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/web/src/app/+options/options.effects.ts b/src/web/src/app/+options/options.effects.ts index 6dc2beb48..40d1ff9f3 100644 --- a/src/web/src/app/+options/options.effects.ts +++ b/src/web/src/app/+options/options.effects.ts @@ -8,6 +8,7 @@ import {ACCOUNTS_OUTLET, ACCOUNTS_PATH, SETTINGS_OUTLET, SETTINGS_PATH} from "sr import {CORE_ACTIONS, NAVIGATION_ACTIONS, OPTIONS_ACTIONS} from "src/web/src/app/store/actions"; import {ElectronService} from "src/web/src/app/+core/electron.service"; import {getZoneNameBoundWebLogger, logActionTypeAndBoundLoggerWithActionType} from "src/web/src/util"; +import {ONE_SECOND_MS} from "src/shared/constants"; import {OptionsSelectors} from "src/web/src/app/store/selectors"; import {OptionsService} from "./options.service"; import {ProgressPatch, State} from "src/web/src/app/store/reducers/options"; @@ -127,7 +128,7 @@ export class OptionsEffects { map(logActionTypeAndBoundLoggerWithActionType({_logger})), concatMap(({payload}) => merge( of(this.buildPatchProgress({changingAccountOrder: true})), - this.electronService.ipcMainClient()("changeAccountOrder")({login: payload.login, index: payload.index}).pipe( + this.electronService.ipcMainClient()("changeAccountOrder", {timeoutMs: ONE_SECOND_MS * 20})(payload).pipe( map((settings) => OPTIONS_ACTIONS.GetSettingsResponse(settings)), catchError((error) => of(CORE_ACTIONS.Fail(error))), finalize(() => this.dispatchProgress({changingAccountOrder: false})),