From c539d1803c1376cba0831be64866b6d2c1652403 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 23 Mar 2022 13:11:36 +0100 Subject: wallet: address crypto worker hang and warning about worker termination --- packages/taler-wallet-core/src/operations/refresh.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-core/src/operations/refresh.ts') diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts index 7753992f7..c422674a9 100644 --- a/packages/taler-wallet-core/src/operations/refresh.ts +++ b/packages/taler-wallet-core/src/operations/refresh.ts @@ -61,13 +61,12 @@ import { AbsoluteTime, URL, } from "@gnu-taler/taler-util"; -import { guardOperationException } from "../errors.js"; import { updateExchangeFromUrl } from "./exchanges.js"; import { DenomInfo, EXCHANGE_COINS_LOCK, InternalWalletState, -} from "../common.js"; +} from "../internal-wallet-state.js"; import { isWithdrawableDenom, selectWithdrawalDenominations, @@ -78,6 +77,8 @@ import { } from "../crypto/cryptoTypes.js"; import { GetReadWriteAccess } from "../util/query.js"; import { CryptoApi } from "../index.browser.js"; +import { guardOperationException } from "./common.js"; +import { CryptoApiStoppedError } from "../crypto/workers/cryptoApi.js"; const logger = new Logger("refresh.ts"); @@ -944,6 +945,9 @@ export async function createRefreshGroup( logger.info(`created refresh group ${refreshGroupId}`); processRefreshGroup(ws, refreshGroupId).catch((e) => { + if (e instanceof CryptoApiStoppedError) { + return; + } logger.warn(`processing refresh group ${refreshGroupId} failed: ${e}`); }); -- cgit v1.2.3